added ability to automatically download latest chromium-testing and chromedriver and move them to their proper locations
This commit is contained in:
@@ -20,7 +20,6 @@ Menu, Tray, Add, Pause, PauseScript
|
|||||||
|
|
||||||
Menu, Tray, Add, Show Results, DisplayResults
|
Menu, Tray, Add, Show Results, DisplayResults
|
||||||
Menu, Tray, Add, Open New Project, ReloadScript
|
Menu, Tray, Add, Open New Project, ReloadScript
|
||||||
; Menu, Tray, Add, Restart to Last Project Upload Results, ReloadToResults ; @todo fix this as it currently just loads the last project
|
|
||||||
Menu, Tray, Add, Restart with Last Project, RetryUpload
|
Menu, Tray, Add, Restart with Last Project, RetryUpload
|
||||||
Menu, Tray, Default, Restart with Last Project
|
Menu, Tray, Default, Restart with Last Project
|
||||||
|
|
||||||
@@ -32,7 +31,7 @@ global FullScriptName
|
|||||||
|
|
||||||
|
|
||||||
ScriptName = Freedomain Video Uploader
|
ScriptName = Freedomain Video Uploader
|
||||||
ScriptVersion = 3.20
|
ScriptVersion = 3.21
|
||||||
FullScriptName := ScriptName . " - " . ScriptVersion
|
FullScriptName := ScriptName . " - " . ScriptVersion
|
||||||
|
|
||||||
|
|
||||||
@@ -47,6 +46,7 @@ UStartTime := A_TickCount ; start time
|
|||||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\JSON.ahk
|
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\JSON.ahk
|
||||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\RunCMD.ahk
|
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\RunCMD.ahk
|
||||||
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\StdOutToVar.ahk
|
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\StdOutToVar.ahk
|
||||||
|
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk
|
||||||
|
|
||||||
|
|
||||||
;---ToDo---
|
;---ToDo---
|
||||||
@@ -142,7 +142,6 @@ IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgres
|
|||||||
IniRead, XPosition, %SettingsIniFilepath%, General, XPosition
|
IniRead, XPosition, %SettingsIniFilepath%, General, XPosition
|
||||||
IniRead, YPosition, %SettingsIniFilepath%, General, YPosition
|
IniRead, YPosition, %SettingsIniFilepath%, General, YPosition
|
||||||
|
|
||||||
|
|
||||||
IniRead, RootDirToStartIn, %SettingsIniFilepath%, General, RootDirToStartIn
|
IniRead, RootDirToStartIn, %SettingsIniFilepath%, General, RootDirToStartIn
|
||||||
IniRead, LogErrorsToMsgbox, %SettingsIniFilepath%, General, LogErrorsToMsgbox, %A_Space%
|
IniRead, LogErrorsToMsgbox, %SettingsIniFilepath%, General, LogErrorsToMsgbox, %A_Space%
|
||||||
IniRead, UpdateAvailable, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable, 0
|
IniRead, UpdateAvailable, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable, 0
|
||||||
@@ -466,22 +465,11 @@ if(TestingMode){ ; save currently seelcted sites to ini file for next test
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
; @todo: DELETE
|
|
||||||
if(DevMode){
|
|
||||||
; IniWrite, 0, %SettingsIniFilepath%, %ScriptSettingsSection%, UpdateAvailable
|
|
||||||
; UpdateAvailable := 0
|
|
||||||
; Menu, Tray, Add, Reload to Results, ReloadToResults
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(PassedParameter = "ShowResults"){
|
if(PassedParameter = "ShowResults"){
|
||||||
goto, DisplayResults
|
goto, DisplayResults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;---GUI Variables---
|
;---GUI Variables---
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
GuiHeight = 800
|
GuiHeight = 800
|
||||||
@@ -595,25 +583,21 @@ Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdate
|
|||||||
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
||||||
|
|
||||||
|
|
||||||
/*; Podcast Number & Tags
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Text,x%MarginSpace% y+%Marginspace%,Podcast Number
|
|
||||||
|
|
||||||
Gui, Font, Normal
|
|
||||||
|
|
||||||
*/
|
|
||||||
; Video Description
|
; Video Description
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
|
|
||||||
if(NoOriginalVideoDescription)
|
if(NoOriginalVideoDescription)
|
||||||
Gui, Add, Text,cRed y+%Marginspace% x%Marginspace%,Video Description
|
Gui, Add, Text,cRed y+%Marginspace% x%Marginspace%,Video Description
|
||||||
else,
|
else,
|
||||||
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Video Description:
|
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Video Description:
|
||||||
if(TestingMode){
|
|
||||||
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
|
|
||||||
}
|
if(TestingMode)
|
||||||
if(DevMode){
|
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
|
||||||
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
|
|
||||||
}
|
if(DevMode)
|
||||||
|
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
|
||||||
|
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit,x%Marginspace% y+2 w%EditBoxWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
Gui, Add, Edit,x%Marginspace% y+2 w%EditBoxWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
||||||
gui, font, s8
|
gui, font, s8
|
||||||
@@ -676,7 +660,7 @@ gui, Font, Bold
|
|||||||
|
|
||||||
; Script Update Button
|
; Script Update Button
|
||||||
if(UpdateAvailable){
|
if(UpdateAvailable){
|
||||||
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Update Available
|
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Update Available!
|
||||||
; GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
|
; GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
|
||||||
}
|
}
|
||||||
else, {
|
else, {
|
||||||
@@ -694,7 +678,7 @@ Gui, Font, s%GuiFontSize%
|
|||||||
|
|
||||||
; Chrome Update Button
|
; Chrome Update Button
|
||||||
if(ChromeUpdateAvailable){
|
if(ChromeUpdateAvailable){
|
||||||
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Update Available
|
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Update Available!
|
||||||
}
|
}
|
||||||
else, {
|
else, {
|
||||||
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Up-to-Date
|
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Up-to-Date
|
||||||
@@ -736,28 +720,19 @@ Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
|
|||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
|
|
||||||
; Gui, Add, Button, x%PageTwoXStartPos% yp+20 w%PageTwoGroupBoxWidth% h15 gCancelPost center,Chrome Update Available
|
; Settings Section
|
||||||
|
|
||||||
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
||||||
; Gui, Add, Text, y%CheckboxesStartYPos% x+80, Miscellaneous Settings:
|
|
||||||
; Gui, Font, Normal
|
|
||||||
; Gui, Add, Checkbox, vIncludeDescriptionWhenPostingToVideos %IncludeDescriptionWhenPostingToVideos%, Include Description in #videos Posts
|
|
||||||
; Gui, Add, Checkbox, vReuseTabs Checked%ReuseTabsCheckStatus% gUpdateVars, Try to Re-Use Tabs
|
|
||||||
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
|
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
|
||||||
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip Progress
|
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip Progress
|
||||||
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
|
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
|
||||||
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
|
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
|
||||||
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
|
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
|
||||||
; Gui, Add, Checkbox, vAutoUploadErrorLog gUpdateVars Checked%AutoUploadErrorLog%, Auto-Upload Large Errors
|
|
||||||
|
|
||||||
|
|
||||||
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
|
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
|
||||||
|
|
||||||
; -------------------------------PLATFORMS-------------------------------
|
; -------------------------------PLATFORMS-------------------------------
|
||||||
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
|
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
|
||||||
; Gui, Add, Text,y+25 x%PageTwoXStartPos%, ---Platforms----
|
|
||||||
; Gui, Font, Bold
|
|
||||||
|
|
||||||
|
|
||||||
; Msgbox % "LocalsURL: " LocalsURL
|
; Msgbox % "LocalsURL: " LocalsURL
|
||||||
; if(VideoFileSizeInMB < 1792)
|
; if(VideoFileSizeInMB < 1792)
|
||||||
@@ -829,10 +804,13 @@ if(AutoUpdateCheck AND !UpdateAvailable){
|
|||||||
; UpdateAvailable :=
|
; UpdateAvailable :=
|
||||||
|
|
||||||
if(CheckForUpdates(GitReleasesAPIURL))
|
if(CheckForUpdates(GitReleasesAPIURL))
|
||||||
GuiControl,,UpdateAvailable, Uploader Update Available
|
GuiControl,,UpdateAvailable, Uploader Update Available!
|
||||||
|
|
||||||
if(CheckForChromeUpdates(ChromeFilepath))
|
if(CheckForChromeUpdates(ChromeFilepath)){
|
||||||
GuiControl,,ChromeUpdateAvailable, Chrome Update Available
|
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
|
||||||
|
ChromeUpdateAvailable := 1
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -955,38 +933,57 @@ Return
|
|||||||
|
|
||||||
UpdateChrome:
|
UpdateChrome:
|
||||||
|
|
||||||
Return
|
if(CheckForChromeUpdates = "")
|
||||||
|
Status := CheckForChromeUpdates(ChromeFilepath)
|
||||||
|
|
||||||
; now defunt, safe to remove
|
if(!status){
|
||||||
CreateDescriptionForVideosPosting:
|
OnMessage(0x44, "OnMsgBoxConfirmChromiumOverwrite")
|
||||||
; msgbox, here
|
MsgBox 0x41, Already Up-to-Date, Yor current Chromium version is already up to date. `nDo you want to download and overwrite it?
|
||||||
Gui, VideoDescriptionTrimmer:New,
|
OnMessage(0x44, "")
|
||||||
Gui, Font, s%GuiFontSize%
|
|
||||||
Gui, Add, Text,, Discord and Telegram have a maximum API post length of 2000 Characters `nwhich the curent description exceeds.`nPlease Trim down the description and then click submit.
|
IfMsgBox OK, {
|
||||||
Gui, Font, s%GuiFontSize%
|
Return
|
||||||
Gui, Add, Edit, w800 h500 gUpdateVars vVideoDescriptionForVideosChannel, %VideoDescription%
|
} Else IfMsgBox Cancel, {
|
||||||
Gui, Add, Button, gSubmitDescriptionForVideosChannel, Submit
|
|
||||||
gui, Show,w820, Video Description Trimmer
|
}
|
||||||
; msgbox
|
}
|
||||||
Return
|
|
||||||
|
|
||||||
|
|
||||||
SubmitDescriptionForVideosChannel:
|
DownloadLatestChromium()
|
||||||
Gui, Submit
|
|
||||||
; msgbox, submitted
|
|
||||||
if(CurrentSocialMediaPosting = "Discord")
|
|
||||||
Goto, SubmitDescriptionForDiscordVideosChannel
|
|
||||||
if(CurrentSocialMediaPosting = "Telegram")
|
|
||||||
Goto, SubmitDescriptionForTelegramVideosChannel
|
|
||||||
|
|
||||||
if(CurrentSocialMediaPosting = "Telegram Video")
|
|
||||||
goto, SubmitDescriptionForTelegramVideoUpload
|
|
||||||
|
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
; now defunt, safe to remove
|
||||||
|
CreateDescriptionForVideosPosting:
|
||||||
|
; msgbox, here
|
||||||
|
Gui, VideoDescriptionTrimmer:New,
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Add, Text,, Discord and Telegram have a maximum API post length of 2000 Characters `nwhich the curent description exceeds.`nPlease Trim down the description and then click submit.
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Add, Edit, w800 h500 gUpdateVars vVideoDescriptionForVideosChannel, %VideoDescription%
|
||||||
|
Gui, Add, Button, gSubmitDescriptionForVideosChannel, Submit
|
||||||
|
gui, Show,w820, Video Description Trimmer
|
||||||
|
; msgbox
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
SubmitDescriptionForVideosChannel:
|
||||||
|
Gui, Submit
|
||||||
|
; msgbox, submitted
|
||||||
|
if(CurrentSocialMediaPosting = "Discord")
|
||||||
|
Goto, SubmitDescriptionForDiscordVideosChannel
|
||||||
|
if(CurrentSocialMediaPosting = "Telegram")
|
||||||
|
Goto, SubmitDescriptionForTelegramVideosChannel
|
||||||
|
|
||||||
|
if(CurrentSocialMediaPosting = "Telegram Video")
|
||||||
|
goto, SubmitDescriptionForTelegramVideoUpload
|
||||||
|
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CreateDescriptionForSocialMedia(){
|
CreateDescriptionForSocialMedia(){
|
||||||
SplitText = Free Documentaries:
|
SplitText = Free Documentaries:
|
||||||
|
|
||||||
SocialMediaDescription := StrSplit(VideoDescription, SplitText)
|
SocialMediaDescription := StrSplit(VideoDescription, SplitText)
|
||||||
@@ -998,25 +995,22 @@ CreateDescriptionForSocialMedia(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
; -------------------------------Upload Video Functionality-------------------------------
|
; -------------------------------Upload Video Functionality-------------------------------
|
||||||
StartScript:
|
StartScript:
|
||||||
WinGetPos, XPosition, YPosition, , , A
|
WinGetPos, XPosition, YPosition, , , A
|
||||||
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
||||||
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
||||||
|
|
||||||
; Msgbox % "XPosition: " XPosition
|
Gui, Submit
|
||||||
; Msgbox % "YPosition: " YPosition
|
Gui, Destroy
|
||||||
Gui, Submit
|
|
||||||
Gui, Destroy
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Save Testing Mode Info
|
||||||
;---Save Testing Mode Info---
|
;------------------------------------------------
|
||||||
;------------------------------------------------
|
if(TestingMode){ ; save currently seelcted sites to ini file for next test
|
||||||
if(TestingMode){ ; save currently seelcted sites to ini file for next test
|
|
||||||
; IniWrite, %Streamanity%, %SettingsIniFilepath%, Testing, Streamanity
|
; IniWrite, %Streamanity%, %SettingsIniFilepath%, Testing, Streamanity
|
||||||
IniWrite, %BitChute%, %SettingsIniFilepath%, Testing, BitChute
|
IniWrite, %BitChute%, %SettingsIniFilepath%, Testing, BitChute
|
||||||
IniWrite, %OdyseeVideo%, %SettingsIniFilepath%, Testing, OdyseeVideo
|
IniWrite, %OdyseeVideo%, %SettingsIniFilepath%, Testing, OdyseeVideo
|
||||||
@@ -1029,154 +1023,127 @@ if(TestingMode){ ; save currently seelcted sites to ini file for next test
|
|||||||
IniWrite, %Locals%, %SettingsIniFilepath%, Testing, Locals
|
IniWrite, %Locals%, %SettingsIniFilepath%, Testing, Locals
|
||||||
IniWrite, %Telegram%, %SettingsIniFilepath%, Testing, Telegram
|
IniWrite, %Telegram%, %SettingsIniFilepath%, Testing, Telegram
|
||||||
IniWrite, %Facebook%, %SettingsIniFilepath%, Testing, Facebook
|
IniWrite, %Facebook%, %SettingsIniFilepath%, Testing, Facebook
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Save Video Info
|
||||||
|
;------------------------------------------------
|
||||||
|
; if changes made, delete the original file and save the new content to it
|
||||||
|
|
||||||
;---\Save Testing Mode Info---
|
if(VideoTitle != OriginalVideoTitle){
|
||||||
;------------------------------------------------
|
|
||||||
|
|
||||||
; -------------------------------Save All Info .txt Files-------------------------------
|
|
||||||
|
|
||||||
/*; Msgbox % "NOOriginalVideoTitle: " NOOriginalVideoTitle
|
|
||||||
if(VideoTitleEmpty){
|
|
||||||
; msgbox, appending title.
|
|
||||||
FileAppend, %VideoTitle%, %VideoFolderDir%\title.txt
|
|
||||||
}
|
|
||||||
if(VideoDescriptionEmpty){
|
|
||||||
; msgbox, appending description
|
|
||||||
FileAppend, %VideoDescription%, %VideoFolderDir%\body.txt
|
|
||||||
}
|
|
||||||
if(VideoTagsEmpty){
|
|
||||||
; msgbox, appending vieo tags
|
|
||||||
FileAppend, %VideoTags%, %VideoFolderDir%\keywords.txt
|
|
||||||
}
|
|
||||||
if(PodcastTagsEmpty){
|
|
||||||
; msgbox, appending vieo tags
|
|
||||||
FileAppend, %VideoTags%, %VideoFolderDir%\keywords.txt
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------Save Video Info-------------------------------
|
|
||||||
; if changes made, delete the original file and save the new content to it
|
|
||||||
|
|
||||||
if(VideoTitle != OriginalVideoTitle){
|
|
||||||
VideoTitleFilepath = %VideoFolderDir%\title.txt
|
VideoTitleFilepath = %VideoFolderDir%\title.txt
|
||||||
|
|
||||||
FileDelete, %VideoTitleFilepath%
|
FileDelete, %VideoTitleFilepath%
|
||||||
FileAppend, %VideoTitle%, %VideoTitleFilepath%
|
FileAppend, %VideoTitle%, %VideoTitleFilepath%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(VideoTags != OriginalVideoTags){
|
if(VideoTags != OriginalVideoTags){
|
||||||
VideoTagsFilepath = %VideoFolderDir%\keywords.txt
|
VideoTagsFilepath = %VideoFolderDir%\keywords.txt
|
||||||
|
|
||||||
FileDelete, %VideoTagsFilepath%
|
FileDelete, %VideoTagsFilepath%
|
||||||
FileAppend, %VideoTags%, %VideoTagsFilepath%
|
FileAppend, %VideoTags%, %VideoTagsFilepath%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(PodcastTags != OriginalPodcastTags){
|
if(PodcastTags != OriginalPodcastTags){
|
||||||
PodcastTagsFilepath = %VideoFolderDir%\keywords_podcast.txt
|
PodcastTagsFilepath = %VideoFolderDir%\keywords_podcast.txt
|
||||||
|
|
||||||
FileDelete, %PodcastTagsFilepath%
|
FileDelete, %PodcastTagsFilepath%
|
||||||
FileAppend, %PodcastTags%, %PodcastTagsFilepath%
|
FileAppend, %PodcastTags%, %PodcastTagsFilepath%
|
||||||
}
|
}
|
||||||
|
|
||||||
if(VideoDescription != OriginalVideoDescription){
|
if(VideoDescription != OriginalVideoDescription){
|
||||||
VideoBodyFilepath = %VideoFolderDir%\body.txt
|
VideoBodyFilepath = %VideoFolderDir%\body.txt
|
||||||
|
|
||||||
FileDelete, %VideoBodyFilepath%
|
FileDelete, %VideoBodyFilepath%
|
||||||
FileAppend, %VideoDescription%, %VideoBodyFilepath%
|
FileAppend, %VideoDescription%, %VideoBodyFilepath%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------/Save Video Info-------------------------------
|
; -------------------------------/Save Video Info-------------------------------
|
||||||
|
|
||||||
; Save settings to config file
|
; Save settings to config file
|
||||||
IniWrite, %ReuseTabs%, %SettingsIniFilepath%, General, ReuseTabs
|
IniWrite, %ReuseTabs%, %SettingsIniFilepath%, General, ReuseTabs
|
||||||
IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, General, ShowTooltipProgress
|
IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, General, ShowTooltipProgress
|
||||||
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, General, AutoUpdateCheck
|
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, General, AutoUpdateCheck
|
||||||
IniWrite, %AutoLogin%, %SettingsIniFilepath%, General, AutoLogin
|
IniWrite, %AutoLogin%, %SettingsIniFilepath%, General, AutoLogin
|
||||||
IniWrite, %PingOnCompletion%, %SettingsIniFilepath%, General, PingOnCompletion
|
IniWrite, %PingOnCompletion%, %SettingsIniFilepath%, General, PingOnCompletion
|
||||||
IniWrite, %KillLBRYAfterUpload%, %SettingsIniFilepath%, General, KillLBRYAfterUpload
|
IniWrite, %KillLBRYAfterUpload%, %SettingsIniFilepath%, General, KillLBRYAfterUpload
|
||||||
|
|
||||||
|
|
||||||
if(VideoFilepath = ""){
|
if(VideoFilepath = ""){
|
||||||
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
||||||
run, "%A_ScriptFullPath%" "LastPost"
|
run, "%A_ScriptFullPath%" "LastPost"
|
||||||
ExitApp
|
ExitApp
|
||||||
}
|
}
|
||||||
|
|
||||||
; -------------------------------/Save All Info .txt Files-------------------------------
|
; Format the LBRYURLSlug to be API Compatible
|
||||||
|
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
|
||||||
|
LBRYURLSlug := VideoTitle
|
||||||
|
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
||||||
|
|
||||||
; Format the LBRYURLSlug to be API Compatible
|
; Save the LBRY URL Slug to .ini file in case it's needed later
|
||||||
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
|
IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
||||||
LBRYURLSlug := VideoTitle
|
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||||
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
||||||
|
|
||||||
; Save the LBRY URL Slug to .ini file in case it's needed later
|
|
||||||
IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
|
||||||
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
|
||||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------Log Info To Text-------------------------------
|
; -------------------------------Log Info To Text-------------------------------
|
||||||
|
|
||||||
(Facebook = 1)?(PostedWebsites .= "Facebook|") : ()
|
(Facebook = 1)?(PostedWebsites .= "Facebook|") : ()
|
||||||
(Bitchute = 1)?(PostedWebsites .= "Bitchute|") : ()
|
(Bitchute = 1)?(PostedWebsites .= "Bitchute|") : ()
|
||||||
(Locals = 1)?(PostedWebsites .= "Locals|") : ()
|
(Locals = 1)?(PostedWebsites .= "Locals|") : ()
|
||||||
(Rumble = 1)?(PostedWebsites .= "Rumble|") : ()
|
(Rumble = 1)?(PostedWebsites .= "Rumble|") : ()
|
||||||
(Brighteon = 1)?(PostedWebsites .= "Brighteon|") : ()
|
(Brighteon = 1)?(PostedWebsites .= "Brighteon|") : ()
|
||||||
; (Streamanity = 1)?(PostedWebsites .= "Streamanity|") : ()
|
; (Streamanity = 1)?(PostedWebsites .= "Streamanity|") : ()
|
||||||
(Telegram = 1)?(PostedWebsites .= "Telegram|") : ()
|
(Telegram = 1)?(PostedWebsites .= "Telegram|") : ()
|
||||||
(DailyMotion = 1)?(PostedWebsites .= "DailyMotion|") : ()
|
(DailyMotion = 1)?(PostedWebsites .= "DailyMotion|") : ()
|
||||||
(OdyseeVideo = 1)?(PostedWebsites .= "OdyseeVideo|") : ()
|
(OdyseeVideo = 1)?(PostedWebsites .= "OdyseeVideo|") : ()
|
||||||
(OdyseeAudio = 1)?(PostedWebsites .= "OdyseeAudio|") : ()
|
(OdyseeAudio = 1)?(PostedWebsites .= "OdyseeAudio|") : ()
|
||||||
|
|
||||||
|
|
||||||
; Log Basic info to the errorlogging file
|
; Log Basic info to the errorlogging file
|
||||||
Message = %ScriptName% v%ScriptVersion%: Starting Upload `nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
Message = %ScriptName% v%ScriptVersion%: Starting Upload `nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
Message := "VideoTitle: " VideoTitle
|
Message := "VideoTitle: " VideoTitle
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
Message := "VideoDescription: `n" VideoDescription
|
Message := "VideoDescription: `n" VideoDescription
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
Message := "VideoTags: " VideoTags
|
Message := "VideoTags: " VideoTags
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
Message := "VideoFilepath: " VideoFilepath
|
Message := "VideoFilepath: " VideoFilepath
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
Message := "VideoThumbFilepath: " VideoThumbFilepath
|
Message := "VideoThumbFilepath: " VideoThumbFilepath
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
; Convert Video Description into javascript text format for sending to selenium
|
; Convert Video Description into javascript text format for sending to selenium
|
||||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
||||||
|
|
||||||
; -------------------------------/Log Info To Text-------------------------------
|
; -------------------------------/Log Info To Text-------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Create an array out of the keywords to be used in different places
|
; Create an array out of the keywords to be used in different places
|
||||||
VideoTags := StrReplace(VideoTags, ", ",",")
|
VideoTags := StrReplace(VideoTags, ", ",",")
|
||||||
VideoTags := StrReplace(VideoTags, " ,",",")
|
VideoTags := StrReplace(VideoTags, " ,",",")
|
||||||
VideoTags := StrReplace(VideoTags, " ",",")
|
VideoTags := StrReplace(VideoTags, " ",",")
|
||||||
|
|
||||||
KeywordsArray := StrSplit(VideoTags,",")
|
KeywordsArray := StrSplit(VideoTags,",")
|
||||||
|
|
||||||
|
|
||||||
; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed
|
; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@@ -1412,7 +1379,7 @@ IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, SocialMediaPoster, So
|
|||||||
|
|
||||||
if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
||||||
OnMessage(0x44, "OnMsgBoxSocialMediaPoster")
|
OnMessage(0x44, "OnMsgBoxSocialMediaPoster")
|
||||||
MsgBox 0x21, No Filepath Found, Unable to find filepath for Social Media Poster`nWould you like to add it?
|
MsgBox 0x21, Filepath Not Found, Unable to find filepath for Social Media Poster`nWould you like to add it?
|
||||||
OnMessage(0x44, "")
|
OnMessage(0x44, "")
|
||||||
|
|
||||||
IfMsgBox OK, {
|
IfMsgBox OK, {
|
||||||
@@ -1420,20 +1387,16 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
if(ErrorLevel)
|
if(ErrorLevel)
|
||||||
Return
|
Return
|
||||||
|
|
||||||
; Msgbox % "SocialMediaPosterFilepath: " SocialMediaPosterFilepath
|
if(!InStr(SocialMediaPosterFilepath, ".exe"))
|
||||||
; if(!InStr(SocialMediaPosterFilepath, ".ahk") OR !InStr(SocialMediaPosterFilepath, ".exe"))
|
Return
|
||||||
; Return
|
|
||||||
|
|
||||||
} Else IfMsgBox Cancel, {
|
} Else IfMsgBox Cancel, {
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
; IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath, %A_Space%
|
|
||||||
IniWrite, SocialMediaPosterFilepath, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath
|
IniWrite, SocialMediaPosterFilepath, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath
|
||||||
; Return
|
|
||||||
|
|
||||||
}
|
}
|
||||||
; msgbox %SocialMediaPosterFilepath%
|
|
||||||
run, %SocialMediaPosterFilepath% "%VideoLinksIniFile%"
|
run, %SocialMediaPosterFilepath% "%VideoLinksIniFile%"
|
||||||
Return
|
Return
|
||||||
|
|
||||||
@@ -1663,3 +1626,14 @@ Return
|
|||||||
; Miscellaneous-Functions
|
; Miscellaneous-Functions
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
#Include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk
|
#Include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
OnMsgBoxConfirmChromiumOverwrite() {
|
||||||
|
DetectHiddenWindows, On
|
||||||
|
Process, Exist
|
||||||
|
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||||
|
ControlSetText Button1, Cancel
|
||||||
|
ControlSetText Button2, Yes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
BIN
Lib/Chromedriver-Mover.exe
Normal file
BIN
Lib/Chromedriver-Mover.exe
Normal file
Binary file not shown.
BIN
Lib/ChromedriverMover.ini
Normal file
BIN
Lib/ChromedriverMover.ini
Normal file
Binary file not shown.
BIN
Lib/Downloads/chrome-win64.zip
Normal file
BIN
Lib/Downloads/chrome-win64.zip
Normal file
Binary file not shown.
BIN
Lib/Downloads/chromedriver-win64.zip
Normal file
BIN
Lib/Downloads/chromedriver-win64.zip
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Submodule Lib/Freedomain-Posters-Shared-Functions updated: ca7145fa82...1962743565
@@ -224,7 +224,6 @@ if(Status){
|
|||||||
Message = Failed to Click "Finish" button
|
Message = Failed to Click "Finish" button
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
; try driver.FindElementByXPath(Xpath).click() ;Try to click on the "Finish" button
|
|
||||||
|
|
||||||
; Error Popup Location if something goes wrong.
|
; Error Popup Location if something goes wrong.
|
||||||
Xpath = /html/body/div[2]/div
|
Xpath = /html/body/div[2]/div
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTex
|
|||||||
|
|
||||||
IniRead, DailyMotionParnerUploadPage, %SettingsIniFilepath%, General, DailyMotionPostPageURL, %A_Space%
|
IniRead, DailyMotionParnerUploadPage, %SettingsIniFilepath%, General, DailyMotionPostPageURL, %A_Space%
|
||||||
if(DailyMotionParnerUploadPage = ""){
|
if(DailyMotionParnerUploadPage = ""){
|
||||||
Message = Please add your DailyMotion Upload URL to settings.ini file under:`n`n[General]`nDailyMotionParnerUploadPage=https://www.dailymotion.com/partner/[YOURIDNUMBER]/media/video/upload
|
Message = Please add your DailyMotion Upload URL to settings.ini file under:`n`n[General]`nDailyMotionPostPageURL=https://www.dailymotion.com/partner/[YOURIDNUMBER]/media/video/upload
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Automated posting to the following media platform using either the Platform's AP
|
|||||||
- Open Chrome and type in `about::version` into the URL bar. The very first line will tell you what Chrome version you have
|
- Open Chrome and type in `about::version` into the URL bar. The very first line will tell you what Chrome version you have
|
||||||
- After downloading, extract “chromedriver_win32.zip” and move the extracted chromedriver.exe to: `C:\Program Files\SeleniumBasic\chromedriver.exe`
|
- After downloading, extract “chromedriver_win32.zip” and move the extracted chromedriver.exe to: `C:\Program Files\SeleniumBasic\chromedriver.exe`
|
||||||
- NOTE: The chromedriver will need to be re-downloaded whenever Chrome updates to keep up with API changes
|
- NOTE: The chromedriver will need to be re-downloaded whenever Chrome updates to keep up with API changes
|
||||||
4. Install the [LBRY Desktop Application](https://lbry.com/)
|
4. Install the [LBRY Desktop Application Manually](https://lbry.com/ or through chocolatey `choco install -y lbry`)
|
||||||
- Once installed log into your account, and also add your LBRY Channel ID to the settings.ini file
|
- Once installed log into your account, and also add your LBRY Channel ID to the settings.ini file
|
||||||
5. [Download the latest .exe of the Uploader](https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader/releases)
|
5. [Download the latest .exe of the Uploader](https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader/releases)
|
||||||
- When run, the Uploader will automatically create the folders and files it requires in the same directory it's run from.
|
- When run, the Uploader will automatically create the folders and files it requires in the same directory it's run from.
|
||||||
|
|||||||
83
Tools/CopyChromeDriverToProgramFiles.ahk
Normal file
83
Tools/CopyChromeDriverToProgramFiles.ahk
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
; ENVIRONMENT
|
||||||
|
;------------------------------------------------
|
||||||
|
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
|
||||||
|
;#Warn ; Enable warnings to assist with detecting common errors.
|
||||||
|
;DetectHiddenWindows, On
|
||||||
|
#SingleInstance, Force
|
||||||
|
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
|
||||||
|
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
|
||||||
|
;SetKeyDelay, 500
|
||||||
|
CoordMode, ToolTip, Screen
|
||||||
|
CoordMode, Mouse, Screen
|
||||||
|
;#NoTrayIcon
|
||||||
|
|
||||||
|
; Notes/Extra Info/#Includes
|
||||||
|
;------------------------------------------------
|
||||||
|
; #Include C:\Users\%A_Username%\Syncthing\Scripts\AutoHotKey\RadialMenu\My codes\My Global Variables.ahk
|
||||||
|
;Menu, Tray, Icon, %A_ICODir%\ICONAME
|
||||||
|
|
||||||
|
ChromeDriverTemporaryFilepath = %1%
|
||||||
|
|
||||||
|
|
||||||
|
; VARIABLES
|
||||||
|
;------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; MAIN SCRIPT
|
||||||
|
;------------------------------------------------
|
||||||
|
StartScriptAsAdmin()
|
||||||
|
|
||||||
|
chromedriverfplocal = %A_ScriptDir%\chromedriver.exe
|
||||||
|
chromedriverfpProgramFiles = C:\Program Files\SeleniumBasic\chromedriver.exe
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
FileDelete, %chromedriverfpProgramFiles%
|
||||||
|
|
||||||
|
if(FileExist(chromedriverfpProgramFiles)){
|
||||||
|
msgbox, failed to delete old chromedriver from: C:\Program Files\SeleniumBasic\chromedriver.exe. Please run this program as admin or move the chromedriver manually.
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
msgbox, pause
|
||||||
|
|
||||||
|
FileCopy, %chromedriverfplocal%, %chromedriverfpProgramFiles%, 1 ; , Dest [, Flag (1 = overwrite)]
|
||||||
|
|
||||||
|
if(!FileExist(chromedriverfpProgramFiles)){
|
||||||
|
msgbox, failed to move chromedriver to C:\Program Files\SeleniumBasic\chromedriver.exe. Please run this program as admin or move the chromedriver manually.
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
msgbox, Chromedriver copied successfully. `nPlease run the TestSeleniumPortable script
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Functions
|
||||||
|
;------------------------------------------------
|
||||||
|
|
||||||
|
StartScriptAsAdmin(){
|
||||||
|
full_command_line := DllCall("GetCommandLine", "str")
|
||||||
|
|
||||||
|
if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)")) {
|
||||||
|
try {
|
||||||
|
if A_IsCompiled
|
||||||
|
Run *RunAs "%A_ScriptFullPath%" /restart
|
||||||
|
else
|
||||||
|
Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
|
||||||
|
}
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!A_IsAdmin){
|
||||||
|
Msgbox, failed to get admin to move chromedriver to program files
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; Misc
|
||||||
|
;------------------------------------------------
|
||||||
|
; Escape::ExitApp
|
||||||
Reference in New Issue
Block a user