@ -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){
if(TestingMode)
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
}
if(DevMode){
if(DevMode)
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
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)){
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
ChromeUpdateAvailable := 1
if(CheckForChromeUpdates(ChromeFilepath))
}
GuiControl,,ChromeUpdateAvailable, Chrome Update Available
}
}
@ -955,6 +933,25 @@ Return
UpdateChrome:
UpdateChrome:
if(CheckForChromeUpdates = "")
Status := CheckForChromeUpdates(ChromeFilepath)
if(!status){
OnMessage(0x44, "OnMsgBoxConfirmChromiumOverwrite")
MsgBox 0x41, Already Up-to-Date, Yor current Chromium version is already up to date. `nDo you want to download and overwrite it?
OnMessage(0x44, "")
IfMsgBox OK, {
Return
} Else IfMsgBox Cancel, {
}
}
DownloadLatestChromium()
Return
Return
; now defunt, safe to remove
; now defunt, safe to remove
@ -1005,16 +1002,13 @@ 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
; Msgbox % "YPosition: " YPosition
Gui, Submit
Gui, Submit
Gui, Destroy
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
@ -1031,33 +1025,8 @@ if(TestingMode){ ; save currently seelcted sites to ini file for next test
IniWrite, %Facebook%, %SettingsIniFilepath%, Testing, Facebook
IniWrite, %Facebook%, %SettingsIniFilepath%, Testing, Facebook
}
}
; Save Video Info
;---\Save Testing Mode Info---
;------------------------------------------------
;------------------------------------------------
; -------------------------------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 changes made, delete the original file and save the new content to it
if(VideoTitle != OriginalVideoTitle){
if(VideoTitle != OriginalVideoTitle){
@ -1109,8 +1078,6 @@ if(VideoFilepath = ""){
ExitApp
ExitApp
}
}
; -------------------------------/Save All Info .txt Files-------------------------------
; Format the LBRYURLSlug to be API Compatible
; Format the LBRYURLSlug to be API Compatible
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
LBRYURLSlug := VideoTitle
LBRYURLSlug := VideoTitle
@ -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
}
}