This commit is contained in:
2024-05-18 00:41:20 -04:00
parent cb42cd069f
commit 211c3ea4fa
7 changed files with 179 additions and 93 deletions

View File

@@ -5,7 +5,7 @@ MediaManagerUpdate:
CurrentSite := "Media Manager"
SaveOrPostProgress(Message:="Scheduling Post in Rumble Studio",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
SaveOrPostProgress(Message:="Navigating to Website",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
IniRead, FDRRadioURL, %SettingsIniFilepath%, General, FDRRadioURL, %A_Space%
@@ -47,6 +47,9 @@ if(InStr(PageURL, "/NotLoggedIn")){
}
Message = Updating Redirect URLs
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
; URL for each redirect
LocalsLiveRedirectURL := FDRRadioBaseURL . "/manage/#/Redirects/Modify?redirectID=738"
RumbleLiveRedirectURL := FDRRadioBaseURL . "/manage/#/Redirects/Modify?redirectID=739"
@@ -59,15 +62,34 @@ IniRead, OdyseeLivestreamURL, %PostStatusesFilepath%, Livestream,OdyseeLivestrea
if(LocalsLivestreamURL)
UpdateMediaManagerRedirect(LocalsLiveRedirectURL, LocalsLivestreamURL)
else, {
Message = LocalsLivestreamURL is blank. Skipping
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
if(RumbleLivestreamURL)
UpdateMediaManagerRedirect(RumbleLiveRedirectURL, RumbleLivestreamURL)
else, {
Message = RumbleLivestreamURL is blank. Skipping
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
if(OdyseeLivestreamURL)
UpdateMediaManagerRedirect(OdyseeLiveRedirectURL, OdyseeLivestreamURL)
else, {
Message = OdyseeLivestreamURL is blank. Skipping
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
}
UpdateMediaManagerRedirect(MediaManagerRedirectPageURL, RedirectURL){
try, driver.Get(MediaManagerRedirectPageURL) ;Open selected URL
try, driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
@@ -75,29 +97,23 @@ UpdateMediaManagerRedirect(MediaManagerRedirectPageURL, RedirectURL){
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=RedirectURL, ClearElement := 1)
if(ConfirmBeforeSubmit){
OnMessage(0x44, "OnMsgBoxUserConfirmation")
MsgBox 0x21, User Confirmation, Please check that all data was input correctly and fix any mistakes and then click PROCEED to finalize the Upload.`n`nClick STOP to cancel the rest of this Upload and move on to the next website.
OnMessage(0x44, "")
IfMsgBox OK, {
} Else IfMsgBox Cancel, {
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
}
; Save button
Xpath = (//span[contains(text(),'Save')])[1]
Status := Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click Save button
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Return "Success"
; Snippet to for check:
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
return
}
; Save button
Xpath = (//span[contains(text(),'Save')])[1]
Status := Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){
Message = Failed to click Save button
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Sleep, 1000
Return "Success"
}

View File

@@ -256,6 +256,7 @@ IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivest
; Grab RTMP Settings
Message = Waiting for Confirmation Screen to grab RTMP Settings
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Xpath = (//span[contains(text(),'View Livestream Settings')])[1]
loop, 60 {
@@ -269,6 +270,12 @@ loop, 60 {
; click on the "View livestream Settings" button
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
if(Status){
Message = Failed to click on -View Livestream Settings- Button
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
; Grab the Stream URL and Key
Xpath = (//input[@name='stream-server'])[1]