diff --git a/Modules/LBRY-Upload.ahk b/Modules/LBRY-Upload.ahk index 8b2b93c..e41d6ee 100644 --- a/Modules/LBRY-Upload.ahk +++ b/Modules/LBRY-Upload.ahk @@ -31,15 +31,19 @@ if(!FileExist(LBRYKillerPath)){ ; Msgbox % "LBRYKillerPath: " LBRYKillerPath ; Msgbox % "LBRYProcessKillerURL: " LBRYProcessKillerURL LBRYKillerPath = %A_ScriptDir%\Lib\LBRY Process Killer.exe - LBRYKillerUpdateURL = https://git.freedomainplaylists.com/attachments/7865dc8d-5aad-4f9f-8a30-94bab0192b1d + LBRYKillerUpdateURL = https://freedomain.dev/yuriy/video-uploader/raw/branch/main/Modules/LBRY-Process-Killer.exe - UrlDownloadToFile, %LBRYKillerUpdateURL%, %LBRYKillerPath% - ; msgbox, work? - ; UrlDownloadToFile, URL, Filename Message = LBRY Process Killer Not Found. Automatically Downloading. SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") -} + UrlDownloadToFile, %LBRYKillerUpdateURL%, %LBRYKillerPath% + if(ErrorLevel){ + Message = Failed to download the the LBRY-Killer.exe from %LBRYKillerUpdateURL% + SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") + Return + } + +} TooltipThis("Uploading Video through API") diff --git a/Modules/Locals-Upload.ahk b/Modules/Locals-Upload.ahk index f51a757..a88d6fc 100644 --- a/Modules/Locals-Upload.ahk +++ b/Modules/Locals-Upload.ahk @@ -25,38 +25,25 @@ Status := NavigateFromBaseURLTo(LocalsPostPageURL) if(Status) Return -/* -if(DevMode){ - MsgBox 0x4, DevMode Skip, Skip uploading section and skip straight to grab URL? - - IfMsgBox Yes, { - goto, Devmodeskip - } Else IfMsgBox No, { - - } - } - */ +Message = Waiting for Page to fully load +SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") +Xpath = //textarea[@id='body'] +Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=10,SleepLength:=1000) +if(Status){ + Message = Page did not load after 10 seconds. Force stopping refresh and trying to continue + SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") + send, {Escape} ; Temporary workaround, as Page seems to endlessly load for Stef - Message = Waiting for Page to fully load - SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") Xpath = //textarea[@id='body'] - Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=10,SleepLength:=1000) + Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) if(Status){ - Message = Page did not load after 10 seconds. Force stopping refresh and trying to continue - SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") + SaveOrPostProgress(Message:="Post Failed: Check Login Status, or Website is Down",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") - send, {Escape} ; Temporary workaround, as Page seems to endlessly load for Stef - - Xpath = //textarea[@id='body'] - Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) - if(Status){ - SaveOrPostProgress(Message:="Post Failed: Check Login Status, or Website is Down",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") - - Return - } + Return } +} /* Message = Inputting Title SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") @@ -253,6 +240,11 @@ Return + + + + + ;--------------LocalsGrabURL---------------------------------- LocalsGrabURL: diff --git a/Modules/Miscellaneous-Functions.ahk b/Modules/Miscellaneous-Functions.ahk index 6b0c2f1..b861a9f 100644 --- a/Modules/Miscellaneous-Functions.ahk +++ b/Modules/Miscellaneous-Functions.ahk @@ -31,7 +31,7 @@ CheckLBRYProcess(){ ; Msgbox % "daemon_settingsText: " daemon_settingsText FileMove, %LBRYDaemonSettingsFP%, %LBRYDaemonSettingsBackupFP%, 1 ; Dest [, Flag (1 = overwrite)] - UrlDownloadToFile, https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader/raw/branch/main/Assets/daemon_settings.yml , %LBRYDaemonSettingsFP% + UrlDownloadToFile, https://freedomain.dev/yuriy/video-uploader/raw/branch/main/Assets/daemon_settings.yml , %LBRYDaemonSettingsFP% sleep, 1000