added media manager redirect updates, odysee RTMP settings grab, gui updates, fixed Locals Livestream URL not showing in GUI, fixed Rumble Studio not saving at end
This commit is contained in:
@@ -152,9 +152,9 @@ if(Status){
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
LivestreamURL := GrabLocalsPostURLUsingTitle(LivestreamTitle)
|
||||
LocalsLivestreamURL := GrabLocalsPostURLUsingTitle(LivestreamTitle)
|
||||
|
||||
if(!InStr(LivestreamURL, "https")){
|
||||
if(!InStr(LocalsLivestreamURL, "https")){
|
||||
; If url was not grabbed. wait 1 minute, reload page and then try grabbing URL again
|
||||
; @todo
|
||||
}
|
||||
@@ -168,7 +168,7 @@ if(!InStr(LivestreamURL, "https")){
|
||||
Message = Navigating to Livestream Page to grab RTMP Settings
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
try, driver.Get(LivestreamURL) ;Open selected URL
|
||||
try, driver.Get(LocalsLivestreamURL) ;Open selected URL
|
||||
driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ LocalsRTMPKey := GetHTMLValueFromXpathOuterHTML(XPATH, "value")
|
||||
|
||||
IniWrite, %LocalsRTMPURL%, %PostStatusesFilepath%, Livestream,LocalsRTMPURL
|
||||
IniWrite, %LocalsRTMPKey%, %PostStatusesFilepath%, Livestream,LocalsRTMPKey
|
||||
IniWrite, %LivestreamURL%, %PostStatusesFilepath%, Livestream,LivestreamURL
|
||||
IniWrite, %LocalsLivestreamURL%, %PostStatusesFilepath%, Livestream,LocalsLivestreamURL
|
||||
|
||||
ToolTip
|
||||
Return
|
||||
|
||||
103
Modules/Media-Manager-Update-Redirects.ahk
Normal file
103
Modules/Media-Manager-Update-Redirects.ahk
Normal file
@@ -0,0 +1,103 @@
|
||||
|
||||
|
||||
MediaManagerUpdate:
|
||||
; ------------------------------------------------
|
||||
|
||||
|
||||
CurrentSite := "Media Manager"
|
||||
SaveOrPostProgress(Message:="Scheduling Post in Rumble Studio",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
IniRead, FDRRadioURL, %SettingsIniFilepath%, General, FDRRadioURL, %A_Space%
|
||||
if(FDRRadioURL = ""){
|
||||
Message = FDRRadioURL is blank in Settings.ini. Please add it to the following location: [General]`nFDRRadioURL=
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
FDRRadioBaseURL := "https://" . ExtractBaseURL(FDRRadioURL)
|
||||
FDRRadioURL := FDRRadioBaseURL . "/manage/"
|
||||
|
||||
Status := NavigateFromBaseURLTo(FDRRadioURL)
|
||||
if(Status)
|
||||
Return
|
||||
|
||||
CheckForAlerts()
|
||||
|
||||
Message = Checking Login Status
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
Try, PageURL := driver.Url
|
||||
if(InStr(PageURL, "/NotLoggedIn")){
|
||||
Message = Logged out. Trying to log back in.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
Xpath = (//span[contains(text(),'Login')])[1]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
|
||||
sleep, 1000
|
||||
|
||||
Try, PageURL := driver.Url
|
||||
if(InStr(PageURL, "/NotLoggedIn")){
|
||||
Message = Failed to log back in automatically. Please login and try again.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
; URL for each redirect
|
||||
LocalsLiveRedirectURL := FDRRadioBaseURL . "/manage/#/Redirects/Modify?redirectID=738"
|
||||
RumbleLiveRedirectURL := FDRRadioBaseURL . "/manage/#/Redirects/Modify?redirectID=739"
|
||||
OdyseeLiveRedirectURL := FDRRadioBaseURL . "/manage/#/Redirects/Modify?redirectID=742"
|
||||
|
||||
; read the url's from the status file
|
||||
IniRead, LocalsLivestreamURL, %PostStatusesFilepath%, Livestream,LocalsLivestreamURL, %A_Space%
|
||||
IniRead, RumbleLivestreamURL, %PostStatusesFilepath%, Livestream,RumbleLivestreamURL, %A_Space%
|
||||
IniRead, OdyseeLivestreamURL, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL, %A_Space%
|
||||
|
||||
|
||||
|
||||
UpdateMediaManagerRedirect(LocalsLiveRedirectURL, LocalsLivestreamURL)
|
||||
UpdateMediaManagerRedirect(RumbleLiveRedirectURL, RumbleLivestreamURL)
|
||||
UpdateMediaManagerRedirect(OdyseeLiveRedirectURL, OdyseeLivestreamURL)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
Xpath = (//input[@id='destinationURL'])[1]
|
||||
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"
|
||||
|
||||
}
|
||||
@@ -234,15 +234,66 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
||||
; Click Create Button in the confirmation popup
|
||||
Xpath = //span[contains(text(),'Create')]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
||||
if(Status){
|
||||
Message = Failed to click "Create" button at the bottom of page
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
; Click confirm button in the popup
|
||||
Xpath = //button[@aria-label='Confirm']//span[@class='button__content']
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
||||
|
||||
if(Status){
|
||||
Message = Failed to click "Confirm" button in confirmation popup
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
OdyseeLivestreamURL := "https://" . OdyseeChannelURL . OdyseeURLSLUG
|
||||
; OdyseeURL := "https://" . OdyseeURL
|
||||
IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL
|
||||
|
||||
|
||||
; Grab RTMP Settings
|
||||
Message = Waiting for Confirmation Screen to grab RTMP Settings
|
||||
|
||||
Xpath = (//span[contains(text(),'View Livestream Settings')])[1]
|
||||
loop, 60 {
|
||||
try, InnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
|
||||
|
||||
if(InnerText = "View Livestream Settings"){
|
||||
break
|
||||
}
|
||||
sleep, 1000
|
||||
}
|
||||
|
||||
; click on the "View livestream Settings" button
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
||||
|
||||
; Grab the Stream URL and Key
|
||||
Xpath = (//input[@name='stream-server'])[1]
|
||||
loop, 5 {
|
||||
Try OdyseeRTMPURL := driver.findelementbyxpath(Xpath).Attribute("value") ;Xpath Value
|
||||
|
||||
if(OdyseeRTMPURL)
|
||||
break
|
||||
else,
|
||||
sleep, 1000
|
||||
}
|
||||
|
||||
Xpath = (//input[@name='livestream-key'])[1]
|
||||
Try OdyseeRTMPKey := driver.findelementbyxpath(Xpath).Attribute("value") ;Xpath Value
|
||||
|
||||
|
||||
if(OdyseeRTMPKey = ""){
|
||||
Message = Failed to grab Odysee RTMP Key. Page did not load?
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
IniWrite, %OdyseeRTMPURL%, %PostStatusesFilepath%, Livestream,OdyseeRTMPURL
|
||||
IniWrite, %OdyseeRTMPKey%, %PostStatusesFilepath%, Livestream,OdyseeRTMPKey
|
||||
|
||||
|
||||
|
||||
Return
|
||||
@@ -9,9 +9,6 @@ Status := NavigateFromBaseURLTo("https://studio.rumble.com/api/signin")
|
||||
if(Status)
|
||||
Return
|
||||
|
||||
|
||||
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||
|
||||
CheckForAlerts()
|
||||
|
||||
Message = Checking Login Status
|
||||
@@ -43,11 +40,14 @@ if(InStr(CurrentURL, "/sso/auth/consent")){
|
||||
Message = Scheduling new stream and inputting information
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
; Schedule new stream
|
||||
; Schedule a stream button
|
||||
Xpath = //div[normalize-space()='Schedule a stream']
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
|
||||
if(Status){
|
||||
Message = Failed to click "Schedule a Stream" button. Livestream Already exists?
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
Xpath = (//h2[normalize-space()='Select a template (optional)'])
|
||||
try ElementInnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
|
||||
@@ -174,7 +174,8 @@ if(Status){
|
||||
|
||||
; Select each Secondary Platform checkbox
|
||||
; ------------------------------------------------
|
||||
IniRead, RumbleSecondaryPlatformsList, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatforms, %A_Space%
|
||||
IniRead, RumbleSecondaryPlatformsList, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatformsList, %A_Space%
|
||||
|
||||
|
||||
if(RumbleSecondaryPlatformsList = ""){
|
||||
; if variable is empty, get all items in the list and write them to .ini file
|
||||
@@ -186,11 +187,13 @@ if(RumbleSecondaryPlatformsList = ""){
|
||||
|
||||
try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
|
||||
|
||||
RumbleSecondaryPlatformsList .= SecondaryPlatformCheckboxName . "--"
|
||||
|
||||
if(SecondaryPlatformCheckboxName = "Add new destination" OR SecondaryPlatformCheckboxName = ""){
|
||||
Break
|
||||
}
|
||||
|
||||
RumbleSecondaryPlatformsList .= SecondaryPlatformCheckboxName . "--"
|
||||
|
||||
|
||||
}
|
||||
IniWrite, %RumbleSecondaryPlatformsList%, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatformsList
|
||||
MsgBox 0x40, Rumble Secondary Platforms List Generated, Rumble Secondary Platforms List was genearted and all the available options were added to it.`n`nPlease edit the settings.ini file and remove any platforms you do not need selected from the follwoing KEY:`n`n[%ScriptSettingsSection%]`nRumbleSecondaryPlatformsList=
|
||||
@@ -201,7 +204,7 @@ Loop, 10 {
|
||||
|
||||
IndexPlusOne := A_index + 1
|
||||
Xpath = (//div[@class='flex shrink-0 items-center gap-x-4'])[%A_index%]
|
||||
XpathCheckbox = (//div[@class='relative shrink-0'])[%IndexPlusOne%]
|
||||
XpathCheckbox = (//div[@class='relative shrink-0'])[%A_index%]
|
||||
|
||||
|
||||
try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
|
||||
@@ -211,7 +214,7 @@ Loop, 10 {
|
||||
}
|
||||
|
||||
if(!InStr(RumbleSecondaryPlatformsList,SecondaryPlatformCheckboxName))
|
||||
Continue
|
||||
Continue
|
||||
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=XpathCheckbox,NumOfLoops:=2,SleepLength:=1000)
|
||||
if(Status){
|
||||
@@ -241,11 +244,12 @@ if(ConfirmBeforeSubmit){
|
||||
*/
|
||||
|
||||
; click the "next" button to finalize the upload
|
||||
Xpath = (//button[@class='rounded-full px-6 py-2 bg-primary hover:brightness-[0.92] cursor-pointer'])[1]
|
||||
Xpath = (//span[normalize-space()='Next'])[1]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
if(Status){
|
||||
Message = Failed to click "Next" to finalize the upload
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ RumbleSetRTMP:
|
||||
|
||||
|
||||
CurrentSite := "Rumble Studio"
|
||||
Message = Inputting Custom RTMP Settings into Rumble Studio
|
||||
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
Status := NavigateFromBaseURLTo("https://studio.rumble.com/settings/connections")
|
||||
if(Status)
|
||||
@@ -14,17 +12,31 @@ try driver.executeScript("return document.readyState").equals("complete") ; wait
|
||||
|
||||
CheckForAlerts()
|
||||
|
||||
Message = Inputting Custom RTMP Settings into Rumble Studio
|
||||
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
IniRead, LocalsRTMPURL, %PostStatusesFilepath%, Livestream,LocalsRTMPURL, %A_Space%
|
||||
IniRead, LocalsRTMPKey, %PostStatusesFilepath%, Livestream,LocalsRTMPKey, %A_Space%
|
||||
|
||||
IniRead, OdyseeRTMPKey, %PostStatusesFilepath%, Livestream,OdyseeRTMPKey, %A_Space%
|
||||
IniRead, OdyseeRTMPURL, %PostStatusesFilepath%, Livestream,OdyseeRTMPURL, %A_Space%
|
||||
|
||||
|
||||
if(LocalsRTMPURL = ""){
|
||||
Message = Skipping. No LocalsRTMPURL in Status.ini file
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
if(OdyseeRTMPURL = ""){
|
||||
Message = Skipping. No OdyseeRTMPURL in Status.ini file
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loop, 10 {
|
||||
|
||||
; IndexPlusOne := A_index + 1
|
||||
@@ -35,12 +47,21 @@ Loop, 10 {
|
||||
|
||||
try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
|
||||
|
||||
; Msgbox % "SecondaryPlatformCheckboxName: " SecondaryPlatformCheckboxName
|
||||
if(SecondaryPlatformCheckboxName = "LOCALS RTMP USE" OR SecondaryPlatformCheckboxName = "ODYSEE RTMP"){
|
||||
|
||||
if(SecondaryPlatformCheckboxName = "LOCALS RTMP USE"){
|
||||
SiteRTMPURL := LocalsRTMPURL
|
||||
SiteRTMPKey := LocalsRTMPKey
|
||||
}
|
||||
|
||||
if(SecondaryPlatformCheckboxName = "ODYSEE RTMP"){
|
||||
SiteRTMPURL := OdyseeRTMPURL
|
||||
SiteRTMPKey := OdyseeRTMPKey
|
||||
}
|
||||
|
||||
if(SecondaryPlatformCheckboxName = "LOCALS RTMP USE"){
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=XpathCheckbox,NumOfLoops:=2,SleepLength:=1000)
|
||||
if(Status){
|
||||
Message = Failed to click into 3 dot menu for -LOCALS RTMP USE-
|
||||
Message = Failed to click into 3 dot menu for %SecondaryPlatformCheckboxName%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
@@ -49,7 +70,7 @@ Loop, 10 {
|
||||
Xpath = (//span[normalize-space()='Edit RTMP'])[1]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
if(Status){
|
||||
Message = Failed to click into 3 dot menu for -LOCALS RTMP USE-
|
||||
Message = Failed to click into 3 dot menu for %SecondaryPlatformCheckboxName%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
@@ -58,17 +79,20 @@ Loop, 10 {
|
||||
XpathRTMP = (//input[@placeholder='Enter the RTMP URL'])[1]
|
||||
XpathStreamkey = (//input[@placeholder='Enter the stream key'])[1]
|
||||
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathRTMP,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsRTMPURL,ClearElement:=1)
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathStreamkey,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsRTMPKey,ClearElement:=1)
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathRTMP,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=SiteRTMPURL,ClearElement:=1)
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathStreamkey,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=SiteRTMPKey,ClearElement:=1)
|
||||
|
||||
; click save button
|
||||
Xpath = (//button[@class='rounded-full px-6 py-2 bg-primary/50 pointer-events-none'])[1]
|
||||
Xpath = (//button[@class='rounded-full block px-6 py-2 bg-primary hover:brightness-[0.92] cursor-pointer'])[1]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
if(Status){
|
||||
Message = Failed to Click Save Button
|
||||
Message = Failed to Click Save Button for %SecondaryPlatformCheckboxName% modified RMTP Settings
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RumbleCustomRTMPs := "Success"
|
||||
IniWrite, %RumbleCustomRTMPs%, %PostStatusesFilepath%, Livestream,RumbleCustomRTMPs
|
||||
|
||||
Reference in New Issue
Block a user