diff --git a/Freedomain Video Uploader.ahk b/Freedomain Video Uploader.ahk index 7867dce..815f411 100644 --- a/Freedomain Video Uploader.ahk +++ b/Freedomain Video Uploader.ahk @@ -228,15 +228,6 @@ if(LBRYChannelID = ""){ ;---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(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 FileMove, %PassedParameter%, %BackupsFolder%\*, 1 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 FileMove, %PassedParameter%, %BackupsFolder%\*, 1 if(ErrorLevel){ @@ -260,8 +251,19 @@ if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){ } 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) if(PassedParameterLength < 5 and !InStr(PassedParameter, ".exe")){ @@ -651,7 +653,7 @@ if(DescriptionCharCount > 3000){ else, Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount% 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, Bold 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? GetChromeFilepath() - if(Facebook){ - UploadedToSites .= "Facebook," - gosub, FacebookUpload - } +if(Facebook){ + UploadedToSites .= "Facebook," + ; gosub, FacebookUpload +} - if(Telegram){ - UploadedToSites .= "Telegram," - gosub, TelegramVideoUpload - } +if(Telegram){ + UploadedToSites .= "Telegram," + gosub, TelegramVideoUpload +} - ; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed - if(Locals){ - UploadedToSites .= "Locals," - gosub, LocalsUpload - } +; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed +if(Locals){ + UploadedToSites .= "Locals," + gosub, LocalsUpload +} - if(BitChute){ - UploadedToSites .= "Bitchute," - Gosub, BitChuteUpload - } +if(BitChute){ + UploadedToSites .= "Bitchute," + Gosub, BitChuteUpload +} - if(OdyseeVideo){ - UploadedToSites .= "LBRYVideo," - LBRYUploadType := "Video" - Gosub, LBRYVideoUpload - } - if(OdyseeAudio){ - UploadedToSites .= "LBRYAudio," - LBRYUploadType := "Audio" - Gosub, LBRYAudioUpload - } +if(OdyseeVideo){ + UploadedToSites .= "LBRYVideo," + LBRYUploadType := "Video" + Gosub, LBRYVideoUpload +} +if(OdyseeAudio){ + UploadedToSites .= "LBRYAudio," + LBRYUploadType := "Audio" + Gosub, LBRYAudioUpload +} - if(Rumble){ - UploadedToSites .= "Rumble," - Gosub, RumbleUpload - } +if(Rumble){ + UploadedToSites .= "Rumble," + Gosub, RumbleUpload +} - if(Brighteon){ - UploadedToSites .= "Brighteon," - Gosub, BrighteonUpload - } +if(Brighteon){ + UploadedToSites .= "Brighteon," + Gosub, BrighteonUpload +} - if(DailyMotion){ - UploadedToSites .= "DailyMotion," - Gosub, DailyMotionUpload +if(DailyMotion){ + UploadedToSites .= "DailyMotion," + Gosub, DailyMotionUpload - } +} - ; grab the LBRY Video/Audio URLs - if(OdyseeVideo){ - LBRYUploadType := "Video" - Gosub, LBRYGetURL - } - if(OdyseeAudio){ - LBRYUploadType := "Audio" - Gosub, LBRYGetURL - } +; grab the LBRY Video/Audio URLs +if(OdyseeVideo){ + LBRYUploadType := "Video" + Gosub, LBRYGetURL +} +if(OdyseeAudio){ + LBRYUploadType := "Audio" + Gosub, LBRYGetURL +} /* if(OdyseeVideoThumb){ OdyseeUploadType := "Video" @@ -4058,10 +4060,10 @@ sleep, 30000 Xpath = //ul[@data-test-id='videos-media-list']//li//div//div//div//div//h3//a try, DailyMotionInternalURL := driver.findelementbyxpath(Xpath).Attribute("href") if(DailyMotionInternalURL = ""){ - Message = Failed to Grab Video URL. Upload Most likely Failed. - SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") - SaveDriverURLOFErrorPage() - Return + Message = Failed to Grab Video URL. Upload Most likely Failed. + SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") + SaveDriverURLOFErrorPage() + Return }