3 Commits
1.23 ... 1.25

10 changed files with 465 additions and 106 deletions

BIN
Assets/Preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -53,8 +53,6 @@ CheckIfUpdateInstalled(PassedInArgument)
; VARIABLES ; VARIABLES
;------------------------------------------------ ;------------------------------------------------
@@ -66,10 +64,13 @@ global FullScriptName
global PostStatusesFilepath global PostStatusesFilepath
global ErrorLoggingDirectory global ErrorLoggingDirectory
global ConfirmBeforeSubmit
global DiscordErrorLoggingWebhookBotURL global DiscordErrorLoggingWebhookBotURL
global DiscordVideosWebhookURL global DiscordVideosWebhookURL
global VideoFolderDir global VideoFolderDir
global LogErrorsToMsgbox global LogErrorsToMsgbox
global ErrorLogToDiscord
; global LogErrorsToTextFile ; global LogErrorsToTextFile
global CurrentSite global CurrentSite
global Driver global Driver
@@ -105,17 +106,20 @@ FileInstall, Version.ini, %A_ScriptDir%\Lib\Version.ini, 1
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Version, 0.0 IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Version, 0.0
; IniRead, ScriptName, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Name, %ScriptSettingsSection% ; IniRead, ScriptName, %A_ScriptDir%\Lib\Version.ini,%ScriptSettingsSection%, Name, %ScriptSettingsSection%
global ScriptName := "Freedomain Livestream Scheduler" global ScriptName
global ScriptAbbreviatedName := "FLS" ; used for error logging ScriptName := "Freedomain Livestream Scheduler"
global ScriptAbbreviatedName
ScriptAbbreviatedName := "FLS" ; used for error logging
FullScriptName := ScriptName . " - " . ScriptVersion FullScriptName := ScriptName . " - " . ScriptVersion
; Msgbox % "FullScriptName: " FullScriptName
global GitReleasesAPIURL global GitReleasesAPIURL
GitReleasesAPIURL = https://freedomain.dev/api/v1/repos/yuriy/livestream-scheduler/releases GitReleasesAPIURL = https://freedomain.dev/api/v1/repos/yuriy/livestream-scheduler/releases
; Read Info From Files ; Read Info From Files
; ------------------------------------------------ ; ------------------------------------------------
; For Templates and re-trying a failed previous run ; For Templates and re-trying a failed previous run
@@ -157,19 +161,35 @@ LivestreamThumbnail := ThumbnailJPEGFilepath
; ------------------------------------------------ ; ------------------------------------------------
IniRead, ConfirmBeforeSubmit, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit, 1 IniRead, ConfirmBeforeSubmit, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit, 1
IniRead, AutoUpdateCheck, %SettingsIniFilepath%, %ScriptSettingsSection%, AutoUpdateCheck, 1 IniRead, AutoUpdateCheck, %SettingsIniFilepath%, %ScriptSettingsSection%, AutoUpdateCheck, 1
IniRead, ErrorLogToDiscord, %SettingsIniFilepath%, %ScriptSettingsSection%, ErrorLogToDiscord, 1
if(ErrorLogToDiscord){
; Discord
IniRead, DiscordErrorLoggingWebhookBotURL, %SettingsIniFilepath%, General, DiscordWebhookBotURL, %A_space%
if(DiscordErrorLoggingWebhookBotURL = ""){
Message = DiscordErrorLoggingWebhookBotURL is blank. `nWill not be able to post error messages or upload status to discord.`nPlease add discord webhook URL in settings.ini under: `n`n[General]`DiscordErrorLoggingWebhookBotURL=
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,ErrorSummaryVar")
}
}
; GUI Variables ; GUI Variables
; ------------------------------------------------ ; ------------------------------------------------
GuiFontSize = 15
MarginSize := 10 MarginSize := 10
MarginSizeDoubled := MarginSize * 2 MarginSizeDoubled := MarginSize * 2
ButtonHeights := 30 ButtonHeights := 30
ThumbnailPreviewWidth := 200 ThumbnailPreviewWidth := 150
GuiHeight := 470
VerticalLineHeight := GuiHeight - 100
GuiHeight := 440
; Column One ; Column One
ColumnOneWidth := 500 ColumnOneWidth := 500
@@ -178,97 +198,119 @@ ColumnOneEditBoxWidth := ColumnOneWidth - (MarginSize * 2)
ColumnOneEditBoxHalfWidth := (ColumnOneEditBoxWidth / 2) + 5 ColumnOneEditBoxHalfWidth := (ColumnOneEditBoxWidth / 2) + 5
GuiFontSize = 15
; Column Two ; Column Two
ColumnTwoXPosition := ColumnOneWidth + (MarginSize * 2) ColumnTwoXPosition := ColumnOneWidth + (MarginSize * 2)
ColumnTwoVerticalLineXPosition := ColumnTwoXPosition - (MarginSize * 2)
ColumnTwoEditBoxWidth := 200 ColumnTwoEditBoxWidth := 200
ColumnTwoEditBoxHalfWidth := ColumnTwoEditBoxWidth / 2 ColumnTwoEditBoxHalfWidth := ColumnTwoEditBoxWidth / 2
; Column Three
ColumnThreeXPosition := ColumnTwoXPosition + ColumnTwoEditBoxWidth + (MarginSizeDoubled * 2)
ColumnThreeVerticalLineXPosition := ColumnThreeXPosition - (MarginSize * 2)
ColumnThreeEditBoxWidth := 180
GUIWidth := ColumnThreeXPosition + ColumnThreeEditBoxWidth + MarginSize
; Results Screen ; Results Screen
ResultButtonWidth := 250 ResultButtonWidth := 250
ResultButtonEditWidth := 250 ResultButtonEditWidth := 250
ResultButtonHeights := 30 ResultButtonHeights := 30
ResultButtonAndEditWidth := ResultButtonWidth + ResultButtonEditWidth + MarginSize
; START OF GUI ; START OF GUI
; ------------------------------------------------ ; ------------------------------------------------
Gui, Margin, %MarginSize%, %MarginSize%
Gui, Font, s%GuiFontSize% ; Gui Color, 0193C4
; Column One ; Column One
;------------------------------------------------ ;------------------------------------------------
Gui, Font, Bold
Gui, Font, s8
Gui, Add, Text,, Title
Gui, Font, Normal
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, Add, Edit,w%ColumnOneEditBoxWidth% vLivestreamTitle, %LivestreamTitle%
Gui, Font, Bold Gui, Font, Bold
Gui, Font, s8 Gui, Add, Text,x%MarginSize%, Title
Gui, Font, s10
Gui, Font, Normal
Gui, Add, Button, x+%MarginSize% gPasteClipboardToEditBox vPasteClipboardToFLSTitle, Paste Clipboard
Gui, Font, s%GuiFontSize%
Gui, Font, Normal
Gui, Add, Edit,x%MarginSize% w%ColumnOneEditBoxWidth% vLivestreamTitle, %LivestreamTitle%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Add, Text,, Description Gui, Add, Text,, Description
Gui, Font, Normal
Gui, Font, s%GuiFontSize%
Gui, Add, Edit,w%ColumnOneEditBoxWidth% h150 vLivestreamDescription, %LivestreamDescription%
Gui, Font, s10
Gui, Font, Normal
Gui, Add, Button, x+%MarginSize% gPasteClipboardToEditBox vPasteClipboardToFLSDescription, Paste Clipboard
Gui, Font, s%GuiFontSize%
Gui, Font, Normal
Gui, Add, Edit,x%MarginSize% w%ColumnOneEditBoxWidth% h170 vLivestreamDescription, %LivestreamDescription%
Gui, Font, s%GuiFontSize%
Gui, Font, Bold Gui, Font, Bold
Gui, Font, s8
Gui, Add, Text,, Tags (Comma Seperated) Gui, Add, Text,, Tags (Comma Seperated)
Gui, Font, s10
Gui, Font, Normal Gui, Font, Normal
Gui, Add, Button, x+%MarginSize% gPasteClipboardToEditBox vPasteClipboardToFLSTags, Paste Clipboard
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, Add, Edit,w%ColumnOneEditBoxWidth% vLivestreamTags, %LivestreamTags% Gui, Font, Normal
Gui, Add, Edit,x%MarginSize% w%ColumnOneEditBoxWidth% vLivestreamTags, %LivestreamTags%
; Buttons at Bottom of Page
; ------------------------------------------------
; Start with Column one and go across
ScheduleButtonWidths := 234
ScheduleButtonHeight := 50
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, add, text, x0 y+%marginsizeDoubled% w970 0x10
Gui, Add, Button, x%MarginSize% yp+%marginsizeDoubled% w%ColumnTwoEditBoxWidth% h%ScheduleButtonHeight% gLoadPrevious , Load Previous
Gui, Font, Bold Gui, Font, Bold
Gui, Font, s8 ; Gui, Font, S10
Gui, Add, Text,, Thumbnail Gui, Add, Button, x+%marginsize% w%ScheduleButtonWidths% h%ScheduleButtonHeight% gSaveAsTemplate, Save As Template
Gui, Add, Button, x+%MarginSize% yp-3 gSelectThumbnail, Select Gui, Add, Button,x+%marginsize% gSchedulePost h%ScheduleButtonHeight% w%ScheduleButtonWidths% gLoadTemplate, Load Template
Gui, Font, Normal Gui, Add, Button, x+%marginsize% gSchedulePost h%ScheduleButtonHeight% w%ScheduleButtonWidths% gSchedulePost, Schedule
Gui, Font, s%GuiFontSize%
Gui, Add, Picture, x%MarginSize% w%ThumbnailPreviewWidth% h-1 vThumbnailPreview, %LivestreamThumbnail%
Gui, Font, Bold
Gui, Font, S10
Gui, Add, Button, x%ColumnOneEditBoxHalfWidth% yp-%marginsize% w%ColumnOneEditBoxHalfWidth% h40 gSaveAsTemplate, Save As Template
Gui, Add, Button,gSchedulePost w%ColumnOneEditBoxHalfWidth% gLoadTemplate h40 , Load Template
; Gui, Add, Button, yp+0 x%ColumnOneEditBoxHalfWidth% w%ColumnOneEditBoxHalfWidth%, Text button here
; Gui, Add, Edit,w%ColumnOneEditBoxWidth% h150 vLivestreamDescription, This livestream is happening soon!
; Column Two ; Column Two
; ------------------------------------------------ ; ------------------------------------------------
Gui, add, text, x%ColumnTwoVerticalLineXPosition% y%marginSize% h%VerticalLineHeight% 0x11 ;Vertical Line > Etched Gray
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, Font, Bold Gui, Font, Bold
Gui, Add, Text,y0 x%ColumnTwoXPosition%, Settings ; Gui, Add, Text, , Thumbnail
Gui, Add, GroupBox, r2.5 x%ColumnTwoXPosition% y%marginSize% vImageThumbnail w%ColumnTwoEditBoxWidth%,Thumbnail
Gui, Font, s10
Gui, Font, Normal Gui, Font, Normal
Gui, Font, s8 Gui, Add, Button, xp+120 yp-3 gSelectThumbnail, Select
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit ; Gui, Font, Normal
Gui, Add, Checkbox, vAutoUpdateCheck Checked%AutoUpdateCheck%, Auto Update Check ; Gui, Font, s%GuiFontSize%
Gui, Add, Picture, x%ColumnTwoXPosition% y+%marginsize% w%ThumbnailPreviewWidth% h-1 vThumbnailPreview, %LivestreamThumbnail%
if(UpdateAvailable){
Gui, Add, Button, cRed w%ColumnTwoEditBoxWidth% gUpdateScript vUpdateAvailable center, Update Available!
}
else, {
Gui, Add, Button, w%ColumnTwoEditBoxWidth% gUpdateScript vUpdateAvailable center, No Updates Available
}
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, Font, Bold Gui, Font, Bold
; Gui, Add, Text, , Settings Gui, Add, Text, x%ColumnTwoXPosition% yp+100 , Date and Time
Gui, Add, Text, y+%MarginSizeDoubled% , Date and Time
Gui, Font, Normal Gui, Font, Normal
Gui, Add, DateTime, vLivestreamDate w%ColumnTwoEditBoxWidth%, MM/dd/yyyy Gui, Add, DateTime, vLivestreamDate w%ColumnTwoEditBoxWidth%, MM/dd/yyyy
@@ -284,22 +326,53 @@ Gui, Font, Bold
Gui, Add, Text,y+%MarginSizeDoubled% x%ColumnTwoXPosition%, Platforms Gui, Add, Text,y+%MarginSizeDoubled% x%ColumnTwoXPosition%, Platforms
Gui, Font, Normal Gui, Font, Normal
Gui, Font, s6
Gui, Add, Button, x+%marginsize% yp+5 gUncheckAllPlatforms, Uncheck All
; Gui, Add, Checkbox,, Dlive ; Gui, Add, Checkbox,, Dlive
Gui, Font, s%GuiFontSize%
Gui, Add, Checkbox,checked vOdysee, Odysee Gui, Add, Checkbox,x%ColumnTwoXPosition% y+%marginsize% checked vOdysee, Odysee
Gui, Add, Checkbox, x+%marginSize% yp+0 checked vLocals, Locals Gui, Add, Checkbox, x+%marginSize% yp+0 checked vLocals, Locals
Gui, Add, Checkbox,x%ColumnTwoXPosition% y+%marginsize% checked vRumble, Rumble Gui, Add, Checkbox,x%ColumnTwoXPosition% y+%marginsize% checked vRumble, Rumble
Gui, Font, S8 Gui, Font, S8
Gui, Add, Checkbox, x+10 yp+5 Checked vInputRumbleCustomRTMP, Input RTMP Gui, Add, Checkbox, x+10 yp+5 Checked vInputRumbleCustomRTMP, Input RTMP
Gui, add, text, x%ColumnThreeVerticalLineXPosition% y%marginSize% h%VerticalLineHeight% 0x11 ;Vertical Line > Etched Gray
Gui, Font, s15
; Column Three
; ------------------------------------------------
Gui, Font, s%GuiFontSize%
Gui, Font, Bold Gui, Font, Bold
Gui, Add, Button, x%ColumnTwoXPosition% y+%marginsizeDoubled% gSchedulePost w%ColumnTwoEditBoxWidth% h60, Schedule Gui, Add, Text,y0 x%ColumnThreeXPosition%, Settings
; Gui, Font, Normal
Gui, Show, h%GuiHeight%, %FullScriptName%
Gui, Font, s12
Gui, Font, Normal
Gui, Add, Checkbox, vAutoUpdateCheck Checked%AutoUpdateCheck%, Auto Update Check
Gui, Add, Checkbox, vErrorLogToDiscord Checked%ErrorLogToDiscord%, Error Log to Discord
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit
Gui, Font, s%GuiFontSize%
Gui, Font, Bold
Gui, Add, Text, y+%MarginSizeDoubled% x%ColumnThreeXPosition%, Updates
Gui, Font, S10
if(UpdateAvailable)
Gui, Add, Button, cRed w%ColumnTwoEditBoxWidth% center vUpdateAvailable gUpdateScript, FLS Update Available!
else,
Gui, Add, Button, w%ColumnThreeEditBoxWidth% center vUpdateAvailable gUpdateScript, FLS Up-to-Date
if(ChromeUpdateAvailable)
Gui, Add, Button, cRed w%ColumnThreeEditBoxWidth% center vChromeUpdateAvailable gUpdateChrome,Chrome Update Available!
else,
Gui, Add, Button, w%ColumnThreeEditBoxWidth% center vChromeUpdateAvailable gUpdateChrome, Chrome Up-to-Date
Gui, Show, h%GuiHeight% w%GUIWidth%, %FullScriptName%
@@ -323,7 +396,12 @@ Return
UncheckAllPlatforms:
GuiControl,,Odysee,0
GuiControl,,Locals,0
GuiControl,,Rumble,0
GuiControl,,InputRumbleCustomRTMP,0
Return
@@ -363,13 +441,20 @@ if(LivestreamThumbnail){ ; copy thumbnail into folder
Return Return
LoadPrevious:
LoadTemplate: LoadTemplate:
if(A_GuiControl = "Load Previous"){
ErrorLoggingDirectory = %A_ScriptDir%\Lib\ErrorLogging
Message = Loading Previous Post
}
if(A_GuiControl = "Load Template"){
ErrorLoggingDirectory = %A_ScriptDir%\Lib\Templates-%ScriptAbbreviatedName%\
Message = Loading Template Message = Loading Template
}
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,DiscordErrorLogging")
ErrorLoggingDirectory = %A_ScriptDir%\Lib\Templates-%ScriptAbbreviatedName%\ ; ErrorLoggingDirectory = %A_ScriptDir%\Lib\Templates-%ScriptAbbreviatedName%\
FileSelectFolder, ErrorLoggingDirectory, %ErrorLoggingDirectory% FileSelectFolder, ErrorLoggingDirectory, %ErrorLoggingDirectory%
if(ErrorLevel){ if(ErrorLevel){
Tooltip Tooltip
@@ -383,8 +468,8 @@ ExitApp
SelectThumbnail: SelectThumbnail:
FileSelectFile, LivestreamThumbnail, FileSelectFile, LivestreamThumbnail,
; Msgbox % "ThumbnailPreviewWidth: " ThumbnailPreviewWidth
GuiControl, , ThumbnailPreview, *w%ThumbnailPreviewWidth% *h-1 %LivestreamThumbnail% GuiControl, , ThumbnailPreview, *h130 *w-1 %LivestreamThumbnail%
Return Return
@@ -399,6 +484,7 @@ Gui, submit, NoHide
; ------------------------------------------------ ; ------------------------------------------------
IniWrite, %ConfirmBeforeSubmit%, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit IniWrite, %ConfirmBeforeSubmit%, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, %ScriptSettingsSection%, AutoUpdateCheck IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, %ScriptSettingsSection%, AutoUpdateCheck
IniWrite, %ErrorLogToDiscord%, %SettingsIniFilepath%, %ScriptSettingsSection%, ErrorLogToDiscord
; Re-use an existing errorlog or create new directory ; Re-use an existing errorlog or create new directory
@@ -467,13 +553,27 @@ IniRead, LocalsRTMPKey, %PostStatusesFilepath%, Livestream,LocalsRTMPKey, %A_Spa
IniRead, LocalsLivestreamURL, %PostStatusesFilepath%, Livestream,LocalsLivestreamURL, %A_Space% IniRead, LocalsLivestreamURL, %PostStatusesFilepath%, Livestream,LocalsLivestreamURL, %A_Space%
IniRead, OdyseeLivestreamURL, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL, %A_Space% IniRead, OdyseeLivestreamURL, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL, %A_Space%
IniRead, OdyseeRTMPKey, %PostStatusesFilepath%, Livestream,OdyseeRTMPKey, %A_Space%
IniRead, OdyseeRTMPURL, %PostStatusesFilepath%, Livestream,OdyseeRTMPURL, %A_Space%
IniRead, RumbleLivestreamURL, %PostStatusesFilepath%, Livestream,RumbleLivestreamURL, %A_Space% IniRead, RumbleLivestreamURL, %PostStatusesFilepath%, Livestream,RumbleLivestreamURL, %A_Space%
IniRead, RumbleCustomRTMPs, %PostStatusesFilepath%, Livestream,RumbleCustomRTMPs, %A_Space%
Gui, Font, Bold Gui, Font, Bold
Gui, Font, s%GuiFontSize% Gui, Font, s%GuiFontSize%
Gui, Add, Button,x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals RTMP URL
/*Gui, Add, Button, x%MarginSize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Copy Title
Gui, Add, Button, x+%marginsize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Copy Description
*/
Gui, Add, Button,x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Copy Title
Gui, Add, Button, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% center gResultsGUIAction, Copy Description
Gui, add, text, x%MarginSize% y+%marginsize% w%ResultButtonAndEditWidth% 0x10 ;Horizontal Line > Etched Gray
Gui, Add, Button,x%MarginSize% yp+%marginsizeDoubled% h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals RTMP URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsRTMPURL center, %LocalsRTMPURL% Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsRTMPURL center, %LocalsRTMPURL%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals RTMP Key Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals RTMP Key
@@ -482,23 +582,43 @@ Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocal
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals URL Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Locals URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsLivestreamURL gGUIUpdateVars center, %LocalsLivestreamURL% Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vLocalsLivestreamURL gGUIUpdateVars center, %LocalsLivestreamURL%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Odysee RTMP URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vOdyseeRTMPURL gGUIUpdateVars center, %OdyseeRTMPURL%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Odysee RTMP Key
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vOdyseeRTMPKey gGUIUpdateVars center, %OdyseeRTMPKey%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Odysee URL Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Odysee URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vOdyseeLivestreamURL gGUIUpdateVars center, %OdyseeLivestreamURL% Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vOdyseeLivestreamURL gGUIUpdateVars center, %OdyseeLivestreamURL%
Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Rumble URL Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, Rumble URL
Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vRumbleLivestreamURL gGUIUpdateVars center, %RumbleLivestreamURL% Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vRumbleLivestreamURL gGUIUpdateVars center, %RumbleLivestreamURL%
Gui, Add, Button, x%MarginSize% y+%marginsizeDoubled% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%, Open Post Folder Gui, Font, s10
Gui, Add, Button, x+%marginsize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Save Changes Gui, Add, Button, x%MarginSize% y+10 h%ResultButtonHeights% w%ResultButtonWidth% gResultsGUIAction, RTMPs Updated on Rumble
Gui, Add, Button, x%MarginSize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Copy Title Gui, Add, Edit, x+5 yp+0 h%ResultButtonHeights% w%ResultButtonEditWidth% vRumbleCustomRTMPs gGUIUpdateVars center, %RumbleCustomRTMPs%
Gui, Add, Button, x+%marginsize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Copy Description
Gui, Add, Button, x%MarginSize% h%ResultButtonHeights% w%ResultButtonEditWidth% gStartSMP, Start SMP
Gui, add, text, x%MarginSize% y+%marginsizeDoubled% w%ResultButtonAndEditWidth% 0x10 ;Horizontal Line > Etched Gray
Gui, Font, s%GuiFontSize%
Gui, Add, Button, x%MarginSize% y+%marginsize% gResultsGUIAction h%ResultButtonHeights% w%ResultButtonEditWidth%,Save Changes
Gui, Add, Button, x+%marginsize% h%ResultButtonHeights% w%ResultButtonEditWidth% gRetryUpload ,Try Failed Again Gui, Add, Button, x+%marginsize% h%ResultButtonHeights% w%ResultButtonEditWidth% gRetryUpload ,Try Failed Again
Gui, Add, Button, x%MarginSize% h%ResultButtonHeights% w%ResultButtonEditWidth% gStartSMP, Start SMP
; Gui, Font, s10
Gui, Add, Button, x+%marginsize% gUpdateRedirects h%ResultButtonHeights% w%ResultButtonEditWidth%, Update M.M. Redirects
Gui, Font, s%GuiFontSize%
Gui, Add, Button, y%MarginSize% w%ResultButtonEditWidth% Center, Error Log
Gui, Font, s8 Gui, Font, s8
Gui, Font, Normal Gui, Font, Normal
Gui, Add, Button, y%MarginSize% w%ResultButtonEditWidth% Center, Error Log Gui, Add, Edit, y+5 h400 w%ResultButtonEditWidth%, %ErrorLogVar%
Gui, Add, Edit, y+5 h300 w%ResultButtonEditWidth%, %ErrorLogVar%
; Gui, Add, Button, x%MarginSize% gRetryUpload h%ResultButtonHeights% w%ResultButtonEditWidth%,Try Failed Again ; Gui, Add, Button, x%MarginSize% gRetryUpload h%ResultButtonHeights% w%ResultButtonEditWidth%,Try Failed Again
@@ -530,9 +650,7 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
} Else IfMsgBox Cancel, { } Else IfMsgBox Cancel, {
Return Return
} }
IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
} }
run, %SocialMediaPosterFilepath% %StatusFileFilePath% run, %SocialMediaPosterFilepath% %StatusFileFilePath%
@@ -540,6 +658,14 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
/* /*
*/ */
UpdateRedirects:
gosub, MediaManagerUpdate
Return
ResultsGUIAction: ResultsGUIAction:
; Msgbox % "A_GuiControl: " A_GuiControl ; Msgbox % "A_GuiControl: " A_GuiControl
@@ -549,12 +675,22 @@ if(A_GuiControl = "Open Post Folder"){
} }
if(A_GuiControl = "Save Changes"){ if(A_GuiControl = "Save Changes"){
Message = Changes Saved Successfully
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
IniWrite, %LocalsRTMPURL%, %PostStatusesFilepath%, Livestream,LocalsRTMPURL IniWrite, %LocalsRTMPURL%, %PostStatusesFilepath%, Livestream,LocalsRTMPURL
IniWrite, %LocalsRTMPKey%, %PostStatusesFilepath%, Livestream,LocalsRTMPKey IniWrite, %LocalsRTMPKey%, %PostStatusesFilepath%, Livestream,LocalsRTMPKey
IniWrite, %LivestreamURL%, %PostStatusesFilepath%, Livestream,LivestreamURL IniWrite, %LocalsLivestreamURL%, %PostStatusesFilepath%, Livestream,LocalsLivestreamURL
IniWrite, %RumbleLivestreamURL%, %PostStatusesFilepath%, Livestream,RumbleLivestreamURL IniWrite, %RumbleLivestreamURL%, %PostStatusesFilepath%, Livestream,RumbleLivestreamURL
IniWrite, %RumbleCustomRTMPs%, %PostStatusesFilepath%, Livestream,RumbleCustomRTMPs
IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL
IniWrite, %OdyseeRTMPURL%, %PostStatusesFilepath%, Livestream,OdyseeRTMPURL
IniWrite, %OdyseeRTMPKey%, %PostStatusesFilepath%, Livestream,OdyseeRTMPKey
sleep, 1000
Tooltip
Return Return
} }
@@ -577,6 +713,13 @@ if(A_GuiControl = "Rumble URL"){
if(A_GuiControl = "Odysee URL"){ if(A_GuiControl = "Odysee URL"){
Clipboard := OdyseeLivestreamURL Clipboard := OdyseeLivestreamURL
} }
if(A_GuiControl = "Odysee RTMP URL "){
Clipboard := OdyseeRTMPURL
}
if(A_GuiControl = "Odysee RTMP Key "){
Clipboard := OdyseeRTMPKey
}
if(A_GuiControl = "Locals URL"){ if(A_GuiControl = "Locals URL"){
Clipboard := LocalsLivestreamURL Clipboard := LocalsLivestreamURL
@@ -616,10 +759,11 @@ Return
#Include %A_ScriptDir%\Modules\Odysee-Grab-URL.ahk #Include %A_ScriptDir%\Modules\Odysee-Grab-URL.ahk
#Include %A_ScriptDir%\Modules\Rumble-Schedule.ahk #Include %A_ScriptDir%\Modules\Rumble-Schedule.ahk
#Include %A_ScriptDir%\Modules\Rumble-Set-RTMP.ahk #Include %A_ScriptDir%\Modules\Rumble-Set-RTMP.ahk
#Include %A_ScriptDir%\Modules\Media-Manager-Update-Redirects.ahk
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Update-Functions.ahk #Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Shared-GoTos.ahk
; Misc ; Misc

View File

@@ -152,9 +152,9 @@ if(Status){
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") 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 ; If url was not grabbed. wait 1 minute, reload page and then try grabbing URL again
; @todo ; @todo
} }
@@ -168,7 +168,7 @@ if(!InStr(LivestreamURL, "https")){
Message = Navigating to Livestream Page to grab RTMP Settings Message = Navigating to Livestream Page to grab RTMP Settings
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") 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 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, %LocalsRTMPURL%, %PostStatusesFilepath%, Livestream,LocalsRTMPURL
IniWrite, %LocalsRTMPKey%, %PostStatusesFilepath%, Livestream,LocalsRTMPKey IniWrite, %LocalsRTMPKey%, %PostStatusesFilepath%, Livestream,LocalsRTMPKey
IniWrite, %LivestreamURL%, %PostStatusesFilepath%, Livestream,LivestreamURL IniWrite, %LocalsLivestreamURL%, %PostStatusesFilepath%, Livestream,LocalsLivestreamURL
ToolTip ToolTip
Return Return

View File

@@ -0,0 +1,119 @@
MediaManagerUpdate:
; ------------------------------------------------
CurrentSite := "Media Manager"
SaveOrPostProgress(Message:="Navigating to Website",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
}
}
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"
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%
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
Xpath = (//input[@id='destinationURL'])[1]
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=RedirectURL, ClearElement := 1)
; 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

@@ -234,15 +234,73 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
; Click Create Button in the confirmation popup ; Click Create Button in the confirmation popup
Xpath = //span[contains(text(),'Create')] Xpath = //span[contains(text(),'Create')]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000) 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 ; Click confirm button in the popup
Xpath = //button[@aria-label='Confirm']//span[@class='button__content'] Xpath = //button[@aria-label='Confirm']//span[@class='button__content']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000) 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 OdyseeLivestreamURL := "https://" . OdyseeChannelURL . OdyseeURLSLUG
; OdyseeURL := "https://" . OdyseeURL ; OdyseeURL := "https://" . OdyseeURL
IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL IniWrite, %OdyseeLivestreamURL%, %PostStatusesFilepath%, Livestream,OdyseeLivestreamURL
; 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 {
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)
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]
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 Return

View File

@@ -9,9 +9,6 @@ Status := NavigateFromBaseURLTo("https://studio.rumble.com/api/signin")
if(Status) if(Status)
Return Return
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
CheckForAlerts() CheckForAlerts()
Message = Checking Login Status Message = Checking Login Status
@@ -43,11 +40,14 @@ if(InStr(CurrentURL, "/sso/auth/consent")){
Message = Scheduling new stream and inputting information Message = Scheduling new stream and inputting information
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
; Schedule new stream
; Schedule a stream button ; Schedule a stream button
Xpath = //div[normalize-space()='Schedule a stream'] Xpath = //div[normalize-space()='Schedule a stream']
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) 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)']) Xpath = (//h2[normalize-space()='Select a template (optional)'])
try ElementInnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text try ElementInnerText := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
@@ -174,7 +174,8 @@ if(Status){
; Select each Secondary Platform checkbox ; Select each Secondary Platform checkbox
; ------------------------------------------------ ; ------------------------------------------------
IniRead, RumbleSecondaryPlatformsList, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatforms, %A_Space% IniRead, RumbleSecondaryPlatformsList, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatformsList, %A_Space%
if(RumbleSecondaryPlatformsList = ""){ if(RumbleSecondaryPlatformsList = ""){
; if variable is empty, get all items in the list and write them to .ini file ; 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 try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
RumbleSecondaryPlatformsList .= SecondaryPlatformCheckboxName . "--"
if(SecondaryPlatformCheckboxName = "Add new destination" OR SecondaryPlatformCheckboxName = ""){ if(SecondaryPlatformCheckboxName = "Add new destination" OR SecondaryPlatformCheckboxName = ""){
Break Break
} }
RumbleSecondaryPlatformsList .= SecondaryPlatformCheckboxName . "--"
} }
IniWrite, %RumbleSecondaryPlatformsList%, %SettingsIniFilepath%, %ScriptSettingsSection%, RumbleSecondaryPlatformsList 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= 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 IndexPlusOne := A_index + 1
Xpath = (//div[@class='flex shrink-0 items-center gap-x-4'])[%A_index%] 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 try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text
@@ -241,11 +244,12 @@ if(ConfirmBeforeSubmit){
*/ */
; click the "next" button to finalize the upload ; 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) Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){ if(Status){
Message = Failed to click "Next" to finalize the upload Message = Failed to click "Next" to finalize the upload
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
} }

View File

@@ -3,8 +3,6 @@ RumbleSetRTMP:
CurrentSite := "Rumble Studio" 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") Status := NavigateFromBaseURLTo("https://studio.rumble.com/settings/connections")
if(Status) if(Status)
@@ -14,17 +12,31 @@ try driver.executeScript("return document.readyState").equals("complete") ; wait
CheckForAlerts() CheckForAlerts()
Message = Inputting Custom RTMP Settings into Rumble Studio
SaveOrPostProgress(Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
IniRead, LocalsRTMPURL, %PostStatusesFilepath%, Livestream,LocalsRTMPURL, %A_Space% IniRead, LocalsRTMPURL, %PostStatusesFilepath%, Livestream,LocalsRTMPURL, %A_Space%
IniRead, LocalsRTMPKey, %PostStatusesFilepath%, Livestream,LocalsRTMPKey, %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 = ""){ if(LocalsRTMPURL = ""){
Message = Skipping. No LocalsRTMPURL in Status.ini file Message = Skipping. No LocalsRTMPURL in Status.ini file
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return Return
} }
if(OdyseeRTMPURL = ""){
Message = Skipping. No OdyseeRTMPURL in Status.ini file
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return
}
Loop, 10 { Loop, 10 {
; IndexPlusOne := A_index + 1 ; IndexPlusOne := A_index + 1
@@ -35,12 +47,21 @@ Loop, 10 {
try SecondaryPlatformCheckboxName := driver.findelementbyxpath(Xpath).Attribute("innerText") ;XPATH Inner Text 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"){ if(SecondaryPlatformCheckboxName = "LOCALS RTMP USE"){
SiteRTMPURL := LocalsRTMPURL
SiteRTMPKey := LocalsRTMPKey
}
if(SecondaryPlatformCheckboxName = "ODYSEE RTMP"){
SiteRTMPURL := OdyseeRTMPURL
SiteRTMPKey := OdyseeRTMPKey
}
Status := Selenium_LoopToClickXpath(Xpath:=XpathCheckbox,NumOfLoops:=2,SleepLength:=1000) Status := Selenium_LoopToClickXpath(Xpath:=XpathCheckbox,NumOfLoops:=2,SleepLength:=1000)
if(Status){ 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") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return Return
} }
@@ -49,7 +70,7 @@ Loop, 10 {
Xpath = (//span[normalize-space()='Edit RTMP'])[1] Xpath = (//span[normalize-space()='Edit RTMP'])[1]
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){ 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") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
} }
@@ -58,17 +79,20 @@ Loop, 10 {
XpathRTMP = (//input[@placeholder='Enter the RTMP URL'])[1] XpathRTMP = (//input[@placeholder='Enter the RTMP URL'])[1]
XpathStreamkey = (//input[@placeholder='Enter the stream key'])[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:=XpathRTMP,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=SiteRTMPURL,ClearElement:=1)
Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathStreamkey,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=LocalsRTMPKey,ClearElement:=1) Status := Selenium_LoopToSendValueToXpath(Xpath:=XpathStreamkey,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=SiteRTMPKey,ClearElement:=1)
; click save button ; 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) Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
if(Status){ 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") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Return Return
} }
break break
} }
} }
RumbleCustomRTMPs := "Success"
IniWrite, %RumbleCustomRTMPs%, %PostStatusesFilepath%, Livestream,RumbleCustomRTMPs

View File

@@ -1,3 +1,13 @@
# Freedomain-Livestream-Scheduler # Freedomain-Livestream-Scheduler
Livestream Scheduler written for the [Freedomain Philosophy Show](https://freedomain.com/) Livestream Scheduler written for the [Freedomain Philosophy Show](https://freedomain.com/)
![Alt text](Assets/Preview.png "Screenshot of Main Window")
## Features
Automated scheduling of livestreams on the following platforms using Selenium Chrome automation.
* Odysee
* Locals
* Rumble
- The RTMP information from each platform will be grabbed at the end of the schedule and then input into Rumble Studio for Livestreaming.

Binary file not shown.