Fixed Uploader not auto opening last selected project after uploading

pull/2/head
Yuriy 1 year ago
parent 7c0ecd7abe
commit 342fab695a

@ -228,15 +228,6 @@ if(LBRYChannelID = ""){
;---Read Info From Project Files--- ;---Read Info From Project Files---
;------------------------------------------------ ;------------------------------------------------
; Ask user to select file within the production folder
if(PassedParameter = "LastPost"){
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
}
if(PassedParameter = "ShowResults"){
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
}
; if passed argument is .exe file, then script has just been udpated and we need to move the old version ; if passed argument is .exe file, then script has just been udpated and we need to move the old version
if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){ if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){
@ -252,7 +243,7 @@ if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){
; move old version to backups folder, overwrite if name conflict ; move old version to backups folder, overwrite if name conflict
FileMove, %PassedParameter%, %BackupsFolder%\*, 1 FileMove, %PassedParameter%, %BackupsFolder%\*, 1
if(ErrorLevel){ ; most likely because the old version hasn't finished exiting yet if(ErrorLevel){ ; most likely because the old version hasn't finished exiting yet
SaveOrPostProgress(Message:="Starting Up: Moving Old Version",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar") SaveOrPostProgress(Message:="Moving Old Version to Backups",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar")
sleep, 2000 sleep, 2000
FileMove, %PassedParameter%, %BackupsFolder%\*, 1 FileMove, %PassedParameter%, %BackupsFolder%\*, 1
if(ErrorLevel){ if(ErrorLevel){
@ -260,8 +251,19 @@ if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){
} }
ToolTip ToolTip
} }
; Change paramter to LastPost so last post gets automatically opened instead of user having to re-select the file again
PassedParameter = LastPost
} }
if(PassedParameter = "LastPost"){
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
}
if(PassedParameter = "ShowResults"){
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
}
PassedParameterLength := StrLen(PassedParameter) PassedParameterLength := StrLen(PassedParameter)
if(PassedParameterLength < 5 and !InStr(PassedParameter, ".exe")){ if(PassedParameterLength < 5 and !InStr(PassedParameter, ".exe")){
@ -651,7 +653,7 @@ if(DescriptionCharCount > 3000){
else, else,
Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount% Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
Gui, Font, Normal Gui, Font, Normal
Gui, Add,Text, yp+3 xp-310, (Platform Char Limits: DM & Bitchute = 3K, Odysee,Brighteon = 5K) Gui, Add,Text, yp+3 xp-310, (Platform Char. Limits: DM+Bitchute = 3K, Odysee,Brighteon = 5K)
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, font, Bold Gui, font, Bold
Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths
@ -1168,64 +1170,64 @@ KeywordsArray := StrSplit(VideoTags,",")
; @todo: find a better location for this? ; @todo: find a better location for this?
GetChromeFilepath() GetChromeFilepath()
if(Facebook){ if(Facebook){
UploadedToSites .= "Facebook," UploadedToSites .= "Facebook,"
gosub, FacebookUpload ; gosub, FacebookUpload
} }
if(Telegram){ if(Telegram){
UploadedToSites .= "Telegram," UploadedToSites .= "Telegram,"
gosub, TelegramVideoUpload gosub, TelegramVideoUpload
} }
; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed ; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed
if(Locals){ if(Locals){
UploadedToSites .= "Locals," UploadedToSites .= "Locals,"
gosub, LocalsUpload gosub, LocalsUpload
} }
if(BitChute){ if(BitChute){
UploadedToSites .= "Bitchute," UploadedToSites .= "Bitchute,"
Gosub, BitChuteUpload Gosub, BitChuteUpload
} }
if(OdyseeVideo){ if(OdyseeVideo){
UploadedToSites .= "LBRYVideo," UploadedToSites .= "LBRYVideo,"
LBRYUploadType := "Video" LBRYUploadType := "Video"
Gosub, LBRYVideoUpload Gosub, LBRYVideoUpload
} }
if(OdyseeAudio){ if(OdyseeAudio){
UploadedToSites .= "LBRYAudio," UploadedToSites .= "LBRYAudio,"
LBRYUploadType := "Audio" LBRYUploadType := "Audio"
Gosub, LBRYAudioUpload Gosub, LBRYAudioUpload
} }
if(Rumble){ if(Rumble){
UploadedToSites .= "Rumble," UploadedToSites .= "Rumble,"
Gosub, RumbleUpload Gosub, RumbleUpload
} }
if(Brighteon){ if(Brighteon){
UploadedToSites .= "Brighteon," UploadedToSites .= "Brighteon,"
Gosub, BrighteonUpload Gosub, BrighteonUpload
} }
if(DailyMotion){ if(DailyMotion){
UploadedToSites .= "DailyMotion," UploadedToSites .= "DailyMotion,"
Gosub, DailyMotionUpload Gosub, DailyMotionUpload
} }
; grab the LBRY Video/Audio URLs ; grab the LBRY Video/Audio URLs
if(OdyseeVideo){ if(OdyseeVideo){
LBRYUploadType := "Video" LBRYUploadType := "Video"
Gosub, LBRYGetURL Gosub, LBRYGetURL
} }
if(OdyseeAudio){ if(OdyseeAudio){
LBRYUploadType := "Audio" LBRYUploadType := "Audio"
Gosub, LBRYGetURL Gosub, LBRYGetURL
} }
/* if(OdyseeVideoThumb){ /* if(OdyseeVideoThumb){
OdyseeUploadType := "Video" OdyseeUploadType := "Video"
@ -4058,10 +4060,10 @@ sleep, 30000
Xpath = //ul[@data-test-id='videos-media-list']//li//div//div//div//div//h3//a Xpath = //ul[@data-test-id='videos-media-list']//li//div//div//div//div//h3//a
try, DailyMotionInternalURL := driver.findelementbyxpath(Xpath).Attribute("href") try, DailyMotionInternalURL := driver.findelementbyxpath(Xpath).Attribute("href")
if(DailyMotionInternalURL = ""){ if(DailyMotionInternalURL = ""){
Message = Failed to Grab Video URL. Upload Most likely Failed. Message = Failed to Grab Video URL. Upload Most likely Failed.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
SaveDriverURLOFErrorPage() SaveDriverURLOFErrorPage()
Return Return
} }

Loading…
Cancel
Save