added extra checks for proper URL when reading from ini and after logging in

pull/2/head
Yuriy 1 year ago
parent 9a2f8874d5
commit 3a09929e6e

@ -9,7 +9,7 @@ PodcastTags := StrReplace(PodcastTags, "--", "-")
; Msgbox % "PodcastTags: " PodcastTags
Message = Starting Upload
Message = Starting Podcast Upload
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
@ -21,6 +21,11 @@ if(FDRRadioURL = ""){
Return
}
if(!InStr(FDRRadioURL, "/Podcasts/New")){
Message = FDRRadioURL is not formatted properly. Please make sure it ends with "https://....../manage/#/Podcasts/New"
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
IniRead, Username, %SettingsIniFilepath%, General, FDRRadioUN, %A_Space%
IniRead, Password, %SettingsIniFilepath%, General, FDRRadioPW, %A_Space%
@ -137,6 +142,18 @@ if(!Status){ ; if inputting email did NOT fail, then we are on the login page, i
}
Message = Checking URL for /Podcasts/New string
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
try, CurrentURL := driver.url()
if(!InStr(CurrentURL, "/Podcasts/New")){
Message = Re-Navigating to /Podcast/new URL
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
try driver.Get(FDRRadioURL)
}
Message = Waiting for Page to Load
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")

Loading…
Cancel
Save