Compare commits
67 Commits
Author | SHA1 | Date |
---|---|---|
Yuriy | 199fbc1b78 | 4 weeks ago |
Yuriy | 9c52c6ec8d | 4 weeks ago |
Yuriy | 959a81bf98 | 2 months ago |
Yuriy | ce9f8a9885 | 4 months ago |
Yuriy | 71c4093bd9 | 4 months ago |
Yuriy | ba33d479ac | 4 months ago |
Yuriy | da34b98324 | 4 months ago |
Yuriy | 9e76ace3c3 | 4 months ago |
Yuriy | fd0b620e23 | 4 months ago |
Yuriy | c7924f7cc7 | 4 months ago |
Yuriy | 8b43ddc8be | 4 months ago |
Yuriy | dbdefc5a95 | 4 months ago |
Yuriy | 613f9d222a | 4 months ago |
Yuriy | f3817cb9f9 | 4 months ago |
Yuriy | 478f8f769e | 4 months ago |
Yuriy | 1b856287df | 4 months ago |
Yuriy | 45e2d2b0f0 | 5 months ago |
Yuriy | 76d410e4d3 | 5 months ago |
Yuriy | ee21a03d55 | 5 months ago |
Yuriy | 540a688733 | 5 months ago |
Yuriy | be75660548 | 5 months ago |
Yuriy | 9f1388160c | 5 months ago |
Yuriy | 4ce82bde6a | 5 months ago |
Yuriy | d1e471bd26 | 5 months ago |
Yuriy | f5ffe32766 | 5 months ago |
Yuriy | dcd947b136 | 5 months ago |
Yuriy | 4476bfdda6 | 5 months ago |
Yuriy | 5f63640185 | 5 months ago |
Yuriy | 6639c907c9 | 5 months ago |
Yuriy | 3492ecccee | 5 months ago |
Yuriy | 38a579c486 | 5 months ago |
Yuriy | 4beb83caa6 | 5 months ago |
Yuriy | b98ae5e190 | 5 months ago |
Yuriy | ba0bf308b4 | 5 months ago |
Yuriy | 58d80bd084 | 6 months ago |
Yuriy | 8b1a8d407c | 6 months ago |
Yuriy | b59bfbe2cf | 6 months ago |
Yuriy | c4b2eeea8e | 7 months ago |
Yuriy | 723dec3fac | 7 months ago |
Yuriy | c60a45445c | 7 months ago |
Yuriy | fa43716ebe | 7 months ago |
Yuriy | ef3cb41e9c | 7 months ago |
Yuriy | 777cfaa242 | 7 months ago |
Yuriy | dd7c85e22e | 9 months ago |
Yuriy | ca0b6ce1b7 | 10 months ago |
Yuriy | a576a194c1 | 10 months ago |
Yuriy | 9cbe1410e5 | 10 months ago |
Yuriy | f339ede04c | 10 months ago |
Yuriy | 4f4361276f | 10 months ago |
Yuriy | 7acefafdc7 | 10 months ago |
Yuriy | 2cd1b0de84 | 10 months ago |
Yuriy | d01ce11347 | 10 months ago |
Yuriy | d546628d8a | 10 months ago |
Yuriy | 4940d18946 | 10 months ago |
Yuriy | 679e698435 | 10 months ago |
Yuriy | 646d5994df | 10 months ago |
Yuriy | 15e5328d1e | 10 months ago |
Yuriy | ad232d4d44 | 10 months ago |
Yuriy | 0f679a0792 | 10 months ago |
Yuriy | b0290eef6e | 10 months ago |
Yuriy | 678ba3d495 | 10 months ago |
Yuriy | 1d926a91a7 | 10 months ago |
Yuriy | 9ec17b0ead | 11 months ago |
Yuriy | 03c75ab073 | 11 months ago |
Yuriy | a1dc003cdc | 11 months ago |
Yuriy | 1aba6a650a | 11 months ago |
Yuriy | adeb7a9df1 | 11 months ago |
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
Binary file not shown.
After Width: | Height: | Size: 406 KiB |
@ -0,0 +1,164 @@
|
|||||||
|
;---ENVIRONMENT---------------------------------------------------------------------
|
||||||
|
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
|
||||||
|
;#Warn ; Enable warnings to assist with detecting common errors.
|
||||||
|
;DetectHiddenWindows, On
|
||||||
|
#SingleInstance, Force
|
||||||
|
DetectHiddenWindows, ON
|
||||||
|
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
|
||||||
|
; Menu, Tray, Icon, RMScriptManager.ico
|
||||||
|
|
||||||
|
;---Notes/Extra Info/#Includes------------------------------------------------------
|
||||||
|
#Include, %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\WindowCredentialManager.ahk
|
||||||
|
|
||||||
|
;---VARIABLES-----------------------------------------------------------------------
|
||||||
|
ProgramName = Freedomain Video Uploader
|
||||||
|
ExeProgramName = %ProgramName%.exe
|
||||||
|
AHKFilepath = %A_ScriptDir%\%ProgramName%.ahk
|
||||||
|
Exefilepath = %A_ScriptDir%\%ProgramName%.exe
|
||||||
|
icopath = %A_ScriptDir%\Assets\Icon.ico
|
||||||
|
VersionIniFP = %A_ScriptDir%\Version.ini
|
||||||
|
|
||||||
|
; Generate a new errorlog text file each run
|
||||||
|
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
||||||
|
ErrorLogFilepath = %A_ScriptDir%\Lib\ErrorLogging\Compiler_%TodayDate%.txt
|
||||||
|
|
||||||
|
|
||||||
|
; Read Credential token from Windows Credential Manager using WindowCredentialManager.ahk
|
||||||
|
cred := CredRead("FDR-Gitea-Token")
|
||||||
|
GiteaToken := Cred.Password
|
||||||
|
|
||||||
|
; Info for Creating the Release with Gitea-CreateRelease.ps1
|
||||||
|
CreateReleasePS1Filepath = %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Gitea-CreateRelease.ps1
|
||||||
|
CreateReleaseAPIURL = https://freedomain.dev/api/v1/repos/yuriy/video-uploader/releases?token=%GiteaToken%
|
||||||
|
|
||||||
|
; Info for Attaching exe file to release using Gitea-AttachAssetToRelease.ps1
|
||||||
|
AttachAssetToReleasePS1Filepath = %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Gitea-AttachAssetToRelease.ps1
|
||||||
|
AttachAssetToReleaseAPIURL = https://freedomain.dev/api/v1/repos/yuriy/video-uploader/releases
|
||||||
|
|
||||||
|
;---\VARIABLES-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Compile to .exe
|
||||||
|
; ------------------------------------------------
|
||||||
|
; Bump the version number in the version.ini file
|
||||||
|
IniRead, VersionNumber, %VersionIniFP%, Video-Uploader, Version, 0.0 ; , Filename, Section, Key [, Default]
|
||||||
|
VersionNumber += .01
|
||||||
|
VersionNumber := SubStr(VersionNumber, 1, 4)
|
||||||
|
IniWrite, %VersionNumber%, %VersionIniFP%,Video-Uploader, Version
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Kill any active intances of the uploaders so the .exe file can be overwriten by the compilation
|
||||||
|
process, close, %ExeProgramName%
|
||||||
|
|
||||||
|
sleep, 500
|
||||||
|
|
||||||
|
; Delete the .exe file so it can be repalced
|
||||||
|
if(FileExist(Exefilepath)){
|
||||||
|
FileDelete, %Exefilepath%
|
||||||
|
if(ErrorLevel){
|
||||||
|
msgbox, failed to delete Exe file. Please delete manually and re-run the compiler.
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
; check if file exists and if not, give user error and stop
|
||||||
|
if(!FileExist(AHKFilepath)){
|
||||||
|
msgbox, %AHKFilepath% does not exist`nExiting
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
; check if file exists and if not, give user error and stop
|
||||||
|
if(!FileExist(icopath)){
|
||||||
|
msgbox, %icopath% does not exist`nExiting
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
; run, %comspec% /c ""C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%""
|
||||||
|
Command = "C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe" /in "%AHKFilepath%" /out "%exefilepath%" /icon "%icopath%"
|
||||||
|
Results := RunCMD(Command)
|
||||||
|
LogToErrorLogFile(Results, ErrorLogFilepath)
|
||||||
|
|
||||||
|
if(!InStr(Results, "Successfully")){
|
||||||
|
Msgbox, Error, Compilation failed with the following error:`n`n%Results%
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Create new Release on Gitea using Gitea-CreateRelease.ps1
|
||||||
|
; ------------------------------------------------
|
||||||
|
InputBox, ReleaseBody, Release Body, Please Input Text to be used in the Release Body
|
||||||
|
|
||||||
|
ReleaseName := VersionNumber
|
||||||
|
ReleaseTag := VersionNumber
|
||||||
|
|
||||||
|
; Strings with spaces in them need to be surrounted by a single quote and double quote, eg: "'spaced string'"
|
||||||
|
Command = Powershell "%CreateReleasePS1Filepath%" "%CreateReleaseAPIURL%" "%ReleaseName%" "%ReleaseTag%" "'%ReleaseBody%'"
|
||||||
|
|
||||||
|
Message = PowerShell Command to Create Release:`n%Command%
|
||||||
|
LogToErrorLogFile(Message, ErrorLogFilepath)
|
||||||
|
|
||||||
|
Results := RunCMD(Command)
|
||||||
|
Message = API Returned:`n%Results%
|
||||||
|
LogToErrorLogFile(Message, ErrorLogFilepath)
|
||||||
|
|
||||||
|
|
||||||
|
; Pull out the release ID Number, needed for attaching a file to the release
|
||||||
|
SplitText = @{id=
|
||||||
|
SplitText2 = `;
|
||||||
|
ReleaseID := StrSplit(Results, SplitText)[2]
|
||||||
|
ReleaseID := StrSplit(ReleaseID, SplitText2)[1]
|
||||||
|
|
||||||
|
if(ReleaseID = ""){
|
||||||
|
Message = Failed to Grab Release ID`nPlease See Errorlog for Details:`n%ErrorLogFilepath%
|
||||||
|
LogToErrorLogFile(Message, ErrorLogFilepath)
|
||||||
|
Msgbox, %Message%
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
|
||||||
|
Message = ReleaseID: %ReleaseID%
|
||||||
|
LogToErrorLogFile(Message, ErrorLogFilepath)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Attach .exe File to Release using Gitea-AttachAssetToRelease.ps1
|
||||||
|
; ------------------------------------------------
|
||||||
|
AttachAssetToReleaseAPIURL = %AttachAssetToReleaseAPIURL%/%ReleaseID%/assets
|
||||||
|
|
||||||
|
; Strings with spaces in them need to be surrounted by a single quote and double quote, eg: "'spaced string'"
|
||||||
|
Command = Powershell "%AttachAssetToReleasePS1Filepath%" "%AttachAssetToReleaseAPIURL%" "%GiteaToken%" "'%ExeProgramName%'" "'%Exefilepath%'"
|
||||||
|
LogToErrorLogFile(Command, ErrorLogFilepath)
|
||||||
|
|
||||||
|
Results := RunCMD(Command)
|
||||||
|
Message = API Returned: %Results%
|
||||||
|
LogToErrorLogFile(Message, ErrorLogFilepath)
|
||||||
|
|
||||||
|
|
||||||
|
ExitApp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;---FUNCTIONS-----------------------------------------------------------------------
|
||||||
|
LogToErrorLogFile(Text, TextFileFilepath){
|
||||||
|
FileAppend, `n%Text%`n, %TextFileFilepath%
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
|||||||
Subproject commit 1e77871bd8d6f74d4519f1ef6b1e294b2afdad93
|
Subproject commit 95bda715cb2bf2d9dd062e37e61d2dd0a281fcc3
|
@ -0,0 +1,484 @@
|
|||||||
|
;---GUI Variables---
|
||||||
|
;------------------------------------------------
|
||||||
|
SetGUIVariables:
|
||||||
|
GuiHeight = 800
|
||||||
|
GuiWidth = 1366
|
||||||
|
GuiFontSize = 10
|
||||||
|
|
||||||
|
ButtonHeights := 30
|
||||||
|
ResultsActionButtonHeights := 50
|
||||||
|
|
||||||
|
MarginSize := 10
|
||||||
|
MarginSizeDoubled := MarginSize * 2
|
||||||
|
MarginSizeTripled := MarginSize * 3
|
||||||
|
|
||||||
|
EditBoxWidths := (GuiWidth / 100) * 60
|
||||||
|
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSize / 2)
|
||||||
|
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
|
||||||
|
|
||||||
|
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSize * 3)
|
||||||
|
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSize
|
||||||
|
|
||||||
|
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
|
||||||
|
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
|
||||||
|
|
||||||
|
|
||||||
|
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSizeDoubled
|
||||||
|
|
||||||
|
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSize / 2)
|
||||||
|
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSize * 2)
|
||||||
|
|
||||||
|
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSize - 2)
|
||||||
|
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSize * 2)
|
||||||
|
|
||||||
|
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
|
||||||
|
DescriptionCharCountXPos := EditBoxHalfWidths - 40
|
||||||
|
|
||||||
|
PageTwoXStartPos := EditBoxWidths + 50
|
||||||
|
|
||||||
|
CopyButtonWidths := 150
|
||||||
|
ResultEditBoxXPos := CopyButtonWidths + MarginSize + 5
|
||||||
|
ResultEditBoxWidth := EditBoxWidths - ( CopyButtonWidths)
|
||||||
|
|
||||||
|
ResultsEditAndCopyButtonWidth := CopyButtonWidths + ResultEditBoxWidth + MarginSize
|
||||||
|
ResultsGUIWidth := ResultsEditAndCopyButtonWidth + ErrorLogEditBoxWidth + MarginSize
|
||||||
|
|
||||||
|
|
||||||
|
ErrorLogEditBoxXPos := ResultEditBoxWidth + CopyButtonWidths + 30
|
||||||
|
ErrorLogEditBoxHeight := ButtonHeights * 14 + (MarginSize * 9)
|
||||||
|
ErrorLogEditBoxWidth := 330
|
||||||
|
|
||||||
|
|
||||||
|
ResultEditBoxHalfWidths := (((ResultEditBoxWidth + CopyButtonWidths)) - (MarginSize * 3))
|
||||||
|
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidth / 4)
|
||||||
|
ResultLBRYURLEditBoxWidths := ResultLBRYURLEditBoxWidthPieces * 3
|
||||||
|
|
||||||
|
ResultEditBoxThirdsWidths := (ResultEditBoxWidth / 3) - (MarginSize /3)
|
||||||
|
ResultsScreenOneThirdsWidth := (ResultEditBoxWidth + CopyButtonWidths + ErrorLogEditBoxWidth) / 3
|
||||||
|
|
||||||
|
ResultLBRYThumbEditBoxWidth := ResultLBRYURLEditBoxWidthPieces - 5
|
||||||
|
|
||||||
|
|
||||||
|
ButtonWidths := 150
|
||||||
|
ButtonXPos := GuiWidth - ButtonWidths - 15
|
||||||
|
|
||||||
|
SubmitButtonYLocation := GuiHeight - 50
|
||||||
|
SubmitButtonXLocation := GuiWidth - 90
|
||||||
|
CancelButtonXLocation := GuiWidth - 180
|
||||||
|
|
||||||
|
EditBoxHeight := 25
|
||||||
|
ThumbnailPreviewWidth := 300
|
||||||
|
PageTwoGroupBoxWidth := ThumbnailPreviewWidth + 20
|
||||||
|
|
||||||
|
; Size of Description Edit Box and the location of the checkboxes underneath them
|
||||||
|
VideoDescriptionEditBoxHeight = 100
|
||||||
|
CheckboxesStartYPos := 630
|
||||||
|
|
||||||
|
FilePathEditBoxWidths := EditBoxWidths - MarginSize - 70
|
||||||
|
SelectFileButtonWidths := 30
|
||||||
|
|
||||||
|
ButtonStartYPos := CheckboxesStartYPos + 10
|
||||||
|
MarginSquared := MarginSize * 2
|
||||||
|
|
||||||
|
if(DevMode){
|
||||||
|
MainButtonHeight := 30
|
||||||
|
SecondaryButtonHeights := 30
|
||||||
|
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
MainButtonHeight := 30
|
||||||
|
SecondaryButtonHeights := 35
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; -------------------------------GUI-------------------------------
|
||||||
|
SetAndShowMainGUI:
|
||||||
|
Gosub, SetGUIVariables
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Margin, %MarginSize%, %MarginSize%
|
||||||
|
|
||||||
|
; Video Title
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,, Show Title
|
||||||
|
Gui, Add, Text, x%ColumnOneHalfWidthXPos% yp+0,Odysee URL Slug
|
||||||
|
Gui, Add, Text, x%PodcastNumberTextXPos% yp+0,Podcast #
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, y+5 x%MarginSize% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTitle, %VideoTitle%
|
||||||
|
Gui, Add, Edit, yp+0 x+%MarginSize% w%OdyseeURLSlugEditWidth% h%EditBoxHeight% gUpdateVars vLBRYURLSlug, %LBRYURLSlug%
|
||||||
|
Gui, Add, Edit, yp+0 x+%MarginSize% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
|
||||||
|
|
||||||
|
; LBRY URL
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text, x%MarginSize%,Video Tags (Comma Seperated)
|
||||||
|
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSize% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
||||||
|
Gui, Add, Edit, yp+0 x+%MarginSize% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
||||||
|
|
||||||
|
; Description/Summary Headers
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,y+%MarginSize% x%MarginSize%,Description
|
||||||
|
Gui, Add, Text,yp+0 x%ColumnOneHalfWidthXPos%,Summary
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
; Video Description edit box
|
||||||
|
Gui, Add, Edit,x%MarginSize% y+5 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
||||||
|
; Video Summary Edit Box
|
||||||
|
Gui, Add, Edit,x%ColumnOneHalfWidthXPos% yp+0 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoSummary gUpdateVars,%VideoSummary%
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
gui, font, s8
|
||||||
|
Gui, Add, Edit, x%MarginSize% y+5 vDescriptionCharCount, %DescriptionCharCount%
|
||||||
|
Gui, Add,Text, yp+4 x+%MarginSize%,Limits: DM+Bitchute = 3K, Odysee, Brighteon = 5K
|
||||||
|
; Gui, font, Bold
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, font, Bold
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Add, GroupBox,r8.5 x%MarginSize% y+10 w%EditBoxWidths% Center, Filepaths
|
||||||
|
|
||||||
|
; Video Filepath
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,xp+5 yp+15,Video Filepath
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoFilepath,%VideoFilepath%
|
||||||
|
Gui, Add, Button, x+%MarginSize% yp+0 h%EditBoxHeight% gSelectVideoFilepath, Select
|
||||||
|
|
||||||
|
; Video Thumbnail Filepath
|
||||||
|
Gui, Font, Bold
|
||||||
|
if(NoOriginalVideoThumbFilepath)
|
||||||
|
Gui, Add, Text, x%MarginSquared% CRed y+15,Video Thumbnail Filepath
|
||||||
|
else,
|
||||||
|
Gui, Add, Text,y+15 x%MarginSquared% ,Video Thumbnail Filepath
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoThumbFilepath,%VideoThumbFilepath%
|
||||||
|
Gui, Add, Button, x+%MarginSize% yp+0 h%EditBoxHeight% gSelectVideoThumbFilepath, Select
|
||||||
|
; WAV Audio File Filepath
|
||||||
|
Gui, Font, Bold
|
||||||
|
if(WavAudioFilepath = "")
|
||||||
|
Gui, Add, Text,cRed x%MarginSquared% y+15,WAV Filepath
|
||||||
|
else, { ; change text depending on if WAV or FLAC file
|
||||||
|
if(InStr(WavFilepath, ".flac"))
|
||||||
|
Gui, Add, Text,x%MarginSquared% y+15,FLAC Filepath
|
||||||
|
else,
|
||||||
|
Gui, Add, Text,x%MarginSquared% y+15,WAV Filepath
|
||||||
|
}
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vWavAudioFilepath,%WavAudioFilepath%
|
||||||
|
Gui, Add, Button, x+%MarginSize% yp+0 h%EditBoxHeight% gSelectWAVFilepath, Select
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
if(MP3AudioFilepath = "")
|
||||||
|
Gui, Add, Text,cRed x%MarginSquared% y+15,Podcast MP3 Filepath
|
||||||
|
else,
|
||||||
|
Gui, Add, Text,x%MarginSquared% y+15,Podcast MP3 Filepath
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vMP3AudioFilepath,%MP3AudioFilepath%
|
||||||
|
Gui, Add, Button, x+%MarginSize% yp+0 h%EditBoxHeight% gSelectMP3Filepath, Select
|
||||||
|
|
||||||
|
|
||||||
|
; Submit Button
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
gui, Font, Bold
|
||||||
|
|
||||||
|
Gui, Add, Button, w%EditBoxFourthWidths% x%MarginSize% vUpdateAvailable h%SecondaryButtonHeights% gUpdateScript,FVU Up-to-Date
|
||||||
|
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h%SecondaryButtonHeights% gOpenProjectFolder, Open Folder
|
||||||
|
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gScheduleUpload, Schedule for Later
|
||||||
|
|
||||||
|
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vChromeUpdateAvailable gUpdateChrome, Chrome Up-to-Date
|
||||||
|
|
||||||
|
Gui, Add, Button, x+%MarginSize% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Status
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
|
||||||
|
|
||||||
|
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable gUpdatePostScheduler, Post Scheduler Up-To-Date
|
||||||
|
; Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable, Post Scheduler Up-To-Date
|
||||||
|
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h%SecondaryButtonHeights%
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gReloadScript, Open New Project
|
||||||
|
|
||||||
|
|
||||||
|
if(DevMode){
|
||||||
|
Gui, Add, Button, x%MarginSize% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
|
||||||
|
LineSplitXPosition := PageTwoXStartPos - ( MarginSize * 2)
|
||||||
|
gui, add, text, x%LineSplitXPosition% y20 h600 0x11 ; 0x11 is a "line"
|
||||||
|
|
||||||
|
; Miscellaneous Settings
|
||||||
|
; DevMode Buttons
|
||||||
|
gui, Font, s4
|
||||||
|
Gui, Font, Normal
|
||||||
|
DevModToggleButton := PageTwoXStartPos + 160
|
||||||
|
Gui, Add, Button, x%DevModToggleButton% y5 w50 h10 gToggleDevMode,DevMode
|
||||||
|
Gui, Add, Button, x+%MarginSize% y5 w50 h10 gToggleTestingMode, Testing Mode
|
||||||
|
Gui, Add, Button, x+%MarginSize% y5 w50 h10 gOpenGiteaPage, Gitea
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Normal
|
||||||
|
|
||||||
|
; Settings Section
|
||||||
|
Gui, Add, GroupBox,r6 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
||||||
|
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheck%, Auto Update Check
|
||||||
|
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgress% gUpdateVars,Show Tooltip of Actions
|
||||||
|
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUpload%, Kill LBRY After Uploading
|
||||||
|
Gui, Add, Checkbox, vErrorLogToDiscord gUpdateVars Checked%ErrorLogToDiscord%, Error Log to Discord
|
||||||
|
Gui, Add, Checkbox, vDiscordPingOnCompletion gUpdateVars Checked%DiscordPingOnCompletion%, Discord Ping Upon Completion
|
||||||
|
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit
|
||||||
|
|
||||||
|
|
||||||
|
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSize
|
||||||
|
|
||||||
|
; -------------------------------PLATFORMS-------------------------------
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, GroupBox,r6 y+%MarginSizeTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
|
||||||
|
|
||||||
|
Gui, Font, s8
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, xp+80 yp+0 gUncheckAllPlatforms, Uncheck All
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% yp+30 vBitChute Checked%BitChute% gUpdateVars, BitChute
|
||||||
|
|
||||||
|
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
||||||
|
; msgbox, checking grab url
|
||||||
|
Gui, Add, Checkbox, x+%MarginSizeTripled% yp+0 vLocalsGrabURL Checked%Locals% gUpdateVars, Locals (Grab URL)
|
||||||
|
LocalsGrabURL := 1
|
||||||
|
Locals := 0
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
; msgbox, checking locals
|
||||||
|
Gui, Add, Checkbox, x+%MarginSizeTripled% yp+0 vLocals Checked%Locals% gUpdateVars, Locals
|
||||||
|
LocalsGrabURL := 0
|
||||||
|
Locals := 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vOdyseeVideo Checked%OdyseeVideo% gUpdateVars, Odysee Video
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vOdyseeAudio Checked%OdyseeAudio% gUpdateVars, Odysee Audio
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vRumble Checked%Rumble% gUpdateVars, Rumble
|
||||||
|
|
||||||
|
; Brighteon Does not accept videos lower than 300kbps or that don't have the appropriate aspect ratio
|
||||||
|
if(VideoTotalBitrate < 300000 OR !VideoHasBrighteonCompatibleAspectRatio){
|
||||||
|
if(!VideoHasBrighteonCompatibleAspectRatio)
|
||||||
|
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Aspect Ratio is %VideoAspectRatio%)
|
||||||
|
else,
|
||||||
|
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
||||||
|
}
|
||||||
|
else,{
|
||||||
|
Gui, Add, Checkbox, vBrighteon y+%MarginSize% Checked%Brighteon% gUpdateVars, Brighteon
|
||||||
|
}
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, vDailyMotion y+%MarginSize% Checked%DailyMotion% gUpdateVars, DailyMotion
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, GroupBox, r6.5 y+%MarginSizeTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
|
||||||
|
gui, Font, Normal
|
||||||
|
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
|
||||||
|
|
||||||
|
|
||||||
|
gui, Font, Normal
|
||||||
|
gui, font, s7
|
||||||
|
Gui, Add, StatusBar,Center, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
|
||||||
|
|
||||||
|
|
||||||
|
; Show GUI to the user
|
||||||
|
Gui, +Resize +MaximizeBox
|
||||||
|
|
||||||
|
if(XPosition and YPosition)
|
||||||
|
Gui, Show, x%XPosition% y%YPosition%, %FullScriptName% - Upload Settings - %BodyTextFilePath%
|
||||||
|
else,
|
||||||
|
Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
|
||||||
|
|
||||||
|
ControlFocus, Edit4, %FullScriptName%
|
||||||
|
ToolTip
|
||||||
|
|
||||||
|
; calculate run time and convert to seconds
|
||||||
|
URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||||
|
|
||||||
|
|
||||||
|
; - Check for Updates
|
||||||
|
;------------------------------------------------
|
||||||
|
if(AutoUpdateCheck AND !UpdateAvailable){
|
||||||
|
SetTimer, CheckForUpdates, -1000
|
||||||
|
}
|
||||||
|
|
||||||
|
; calculate run time and convert to seconds
|
||||||
|
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||||
|
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Scheduler GUI
|
||||||
|
; ------------------------------------------------
|
||||||
|
ScheduleUpload:
|
||||||
|
gui, Submit, NoHide ; submit the main GUI so all the variables get updated
|
||||||
|
|
||||||
|
; Create GUI for Scheduler
|
||||||
|
Gui, ScheduleGUI:New
|
||||||
|
Gui, Font, s15
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,, Date:
|
||||||
|
Gui, Add, DateTime,w%EditBoxHalfWidths% vScheduledDate , MM/dd/yyyy
|
||||||
|
Gui, Add, Text,, Time:
|
||||||
|
Gui, Add, DateTime, w%EditBoxHalfWidths% vScheduledTime Choose200505311900, Time
|
||||||
|
Gui, Add, Button,w%EditBoxHalfWidths% gSubmitScheduler, Schedule
|
||||||
|
Gui, Show,, Scheduler
|
||||||
|
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Results GUI Screen
|
||||||
|
; ------------------------------------------------
|
||||||
|
SetAndShowResultsGUI:
|
||||||
|
; Set the GUI Variables, needed if called from Scheduler
|
||||||
|
Gosub, SetGUIVariables
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard,Transcript URL
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% w%ResultEditBoxWidth% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Bitchute
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidth% gUpdateVars , %BitChuteURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Brighteon
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidth% gUpdateVars , %BrighteonURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, DailyMotion
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidth% gUpdateVars , %DailyMotionURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Odysee Video
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidth% gUpdateVars, %OdyseeVideoURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Odysee Audio
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidth% gUpdateVars , %OdyseeAudioURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Rumble
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidth% gUpdateVars , %RumbleURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Locals
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidth% gUpdateVars, %LocalsURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Unauthorized
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vUnauthorizedTVURL w%ResultEditBoxWidth% gUpdateVars, %UnauthorizedTVURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Video Tags
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidth% gUpdateVars , %VideoTags%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Podcast Tags
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidth% gUpdateVars , %Podcasttags%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Description
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoDescription w%ResultEditBoxWidth% gUpdateVars , %VideoDescription%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Summary
|
||||||
|
Gui, Font, Normal
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoSummary w%ResultEditBoxWidth% gUpdateVars , %VideoSummary%
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% w%ResultsEditAndCopyButtonWidth% h%SecondaryButtonHeights% gUpdateINI, Save Modified Links to Files
|
||||||
|
|
||||||
|
|
||||||
|
; Error Log Column
|
||||||
|
; ------------------------------------------------
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Add, Button, x+%MarginSize% y%MarginSize% w%ErrorLogEditBoxWidth% h%ButtonHeights% y%MarginSize% gOpenErrorLog, Error Log (Click to Open Detailed Log)
|
||||||
|
Gui, Add, Edit,x%ErrorLogEditBoxXPos% h%ErrorLogEditBoxHeight% w%ErrorLogEditBoxWidth% y+10, %ErrorLogVar%
|
||||||
|
|
||||||
|
gui, font, Normal
|
||||||
|
gui, font, s7
|
||||||
|
Gui, Add, StatusBar,, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
|
||||||
|
Gui, +Resize +MaximizeBox
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Gui, add, text, x%MarginSize% y+%MarginSize% w%ResultsGUIWidth% 0x10 ;Horizontal Line > Etched Gray
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Results GUI Action Buttons
|
||||||
|
; ------------------------------------------------
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% yp+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gOpenLBRYBlobFilesFolder, Open LBRY Blob Folder
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gUploadPodcast vUploadPodcast, Upload Podcast
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gRetryUpload, Try Failed Again
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToDiscordAndTelegram vPostToDiscordTelegramButton, Post to Discord/Telegram
|
||||||
|
; Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToTelegram vPostToTelegramButton, Post to Telegram
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gStartSocialMediaPoster, Start Social Media Poster
|
||||||
|
|
||||||
|
; Row 3
|
||||||
|
; Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSize% w%ResultsScreenOneThirdsWidth% h%ButtonHeights%,
|
||||||
|
|
||||||
|
|
||||||
|
; Gui, Add, Button, x+%MarginSize% w%ResultEditBoxHalfWidths% w%ButtonWidths% h%ButtonHeights% gCancelPost , Close
|
||||||
|
; Gui, Add, Button, x+%MarginSize% w%ResultEditBoxHalfWidths% gKillScript %ButtonWidths% , Close
|
||||||
|
; gui, Add, Text, y+10
|
||||||
|
|
||||||
|
OriginalVideoDescription := VideoDescription
|
||||||
|
OriginalPodcastTags := PodcastTags
|
||||||
|
|
||||||
|
|
||||||
|
if(XPosition and YPosition)
|
||||||
|
Gui, Show,x%XPosition% y%YPosition%,%FullScriptName% - Uploads Status
|
||||||
|
else,
|
||||||
|
Gui, Show,,%FullScriptName% - Uploads Results
|
||||||
|
Return
|
@ -0,0 +1,340 @@
|
|||||||
|
|
||||||
|
DisplayMainGUI:
|
||||||
|
|
||||||
|
;---GUI Variables---
|
||||||
|
;------------------------------------------------
|
||||||
|
GuiHeight = 800
|
||||||
|
GuiWidth = 1366
|
||||||
|
GuiFontSize = 10
|
||||||
|
|
||||||
|
ButtonHeights := 30
|
||||||
|
|
||||||
|
MarginSpace := 10
|
||||||
|
MarginSpaceDoubled := MarginSpace * 2
|
||||||
|
MarginSpaceTripled := MarginSpace * 3
|
||||||
|
|
||||||
|
EditBoxWidths := (GuiWidth / 100) * 60
|
||||||
|
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSpace / 2)
|
||||||
|
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
|
||||||
|
|
||||||
|
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSpace * 3)
|
||||||
|
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSpace
|
||||||
|
|
||||||
|
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
|
||||||
|
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
|
||||||
|
|
||||||
|
|
||||||
|
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSpaceDoubled
|
||||||
|
|
||||||
|
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSpace / 2)
|
||||||
|
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
||||||
|
|
||||||
|
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSpace - 2)
|
||||||
|
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
||||||
|
|
||||||
|
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
|
||||||
|
DescriptionCharCountXPos := EditBoxWidths - 40
|
||||||
|
|
||||||
|
PageTwoXStartPos := EditBoxWidths + 50
|
||||||
|
|
||||||
|
CopyButtonWidths := 150
|
||||||
|
ResultEditBoxXPos := CopyButtonWidths + MarginSpace + 5
|
||||||
|
ResultEditBoxWidths := EditBoxWidths - CopyButtonWidths
|
||||||
|
|
||||||
|
ResultEditBoxHalfWidths := (ResultEditBoxWidths / 2) - (MarginSpace /2)
|
||||||
|
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidths / 4)
|
||||||
|
ResultLBRYURLEditBoxWidths := ResultLBRYURLEditBoxWidthPieces * 3
|
||||||
|
|
||||||
|
ResultEditBoxThirdsWidths := (ResultEditBoxWidths / 3) - (MarginSpace /3)
|
||||||
|
|
||||||
|
|
||||||
|
ResultLBRYThumbEditBoxWidth := ResultLBRYURLEditBoxWidthPieces - 5
|
||||||
|
|
||||||
|
ErrorLogEditBoxXPos := ResultEditBoxWidths + CopyButtonWidths + 30
|
||||||
|
ErrorLogEditBoxHeight := GuiHeight - (MarginSpace * 20) - (ButtonHeights * 2)
|
||||||
|
ErrorLogEditBoxWidth := GuiWidth - ErrorLogEditBoxXPos - (MarginSpace * 12)
|
||||||
|
|
||||||
|
|
||||||
|
ButtonWidths := 150
|
||||||
|
ButtonXPos := GuiWidth - ButtonWidths - 15
|
||||||
|
|
||||||
|
SubmitButtonYLocation := GuiHeight - 50
|
||||||
|
SubmitButtonXLocation := GuiWidth - 90
|
||||||
|
CancelButtonXLocation := GuiWidth - 180
|
||||||
|
|
||||||
|
EditBoxHeight := 25
|
||||||
|
ThumbnailPreviewWidth := 300
|
||||||
|
PageTwoGroupBoxWidth := ThumbnailPreviewWidth + 20
|
||||||
|
|
||||||
|
; Size of Description Edit Box and the location of the checkboxes underneath them
|
||||||
|
VideoDescriptionEditBoxHeight = 100
|
||||||
|
CheckboxesStartYPos := 630
|
||||||
|
|
||||||
|
FilePathEditBoxWidths := EditBoxWidths - MarginSpace - 70
|
||||||
|
SelectFileButtonWidths := 30
|
||||||
|
|
||||||
|
ButtonStartYPos := CheckboxesStartYPos + 10
|
||||||
|
MarginSquared := MarginSpace * 2
|
||||||
|
|
||||||
|
if(DevMode){
|
||||||
|
MainButtonHeight := 30
|
||||||
|
SecondaryButtonHeights := 30
|
||||||
|
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
MainButtonHeight := 30
|
||||||
|
SecondaryButtonHeights := 35
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; -------------------------------GUI-------------------------------
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Margin, %MarginSpace%, %MarginSpace%
|
||||||
|
|
||||||
|
; Video Title
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,, Show Title
|
||||||
|
Gui, Add, Text, x%ColumnOneHalfWidthXPos% yp+0,Odysee URL Slug
|
||||||
|
Gui, Add, Text, x%PodcastNumberTextXPos% yp+0,Podcast #
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, y+5 x%MarginSpace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTitle, %VideoTitle%
|
||||||
|
Gui, Add, Edit, yp+0 x+%Marginspace% w%OdyseeURLSlugEditWidth% h%EditBoxHeight% gUpdateVars vLBRYURLSlug, %LBRYURLSlug%
|
||||||
|
Gui, Add, Edit, yp+0 x+%Marginspace% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
|
||||||
|
|
||||||
|
; LBRY URL
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text, x%Marginspace%,Video Tags (Comma Seperated)
|
||||||
|
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
||||||
|
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
||||||
|
|
||||||
|
|
||||||
|
; Video Description
|
||||||
|
Gui, Font, Bold
|
||||||
|
|
||||||
|
if(NoOriginalVideoDescription)
|
||||||
|
Gui, Add, Text,cRed y+%Marginspace% x%Marginspace%,Video Description
|
||||||
|
else,
|
||||||
|
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Video Description:
|
||||||
|
|
||||||
|
|
||||||
|
if(TestingMode)
|
||||||
|
Gui, Add, Text,cRed yp+0 xp+150 ,TESTING MODE
|
||||||
|
|
||||||
|
if(DevMode)
|
||||||
|
Gui, Add, Text,cRed yp+0 xp+150 ,DEV MODE
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit,x%Marginspace% y+2 w%EditBoxWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
||||||
|
gui, font, s8
|
||||||
|
Gui, font, Bold
|
||||||
|
if(DescriptionCharCount > 3000){
|
||||||
|
Gui, Add, Edit,cRed w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
|
||||||
|
}
|
||||||
|
else,
|
||||||
|
Gui, Add, Edit, w50 h20 x%DescriptionCharCountXPos% y+1 vDescriptionCharCount, %DescriptionCharCount%
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add,Text, yp+3 xp-310, (Platform Char. Limits: DM+Bitchute = 3K, Odysee,Brighteon = 5K)
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, font, Bold
|
||||||
|
Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths
|
||||||
|
|
||||||
|
; Video Filepath
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,xp+5 yp+15,Video Filepath
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoFilepath,%VideoFilepath%
|
||||||
|
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoFilepath, Select
|
||||||
|
|
||||||
|
; Video Thumbnail Filepath
|
||||||
|
Gui, Font, Bold
|
||||||
|
if(NoOriginalVideoThumbFilepath)
|
||||||
|
Gui, Add, Text, x%MarginSquared% CRed y+15,Video Thumbnail Filepath
|
||||||
|
else,
|
||||||
|
Gui, Add, Text,y+15 x%MarginSquared% ,Video Thumbnail Filepath
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoThumbFilepath,%VideoThumbFilepath%
|
||||||
|
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoThumbFilepath, Select
|
||||||
|
; WAV Audio File Filepath
|
||||||
|
Gui, Font, Bold
|
||||||
|
if(WavAudioFilepath = "")
|
||||||
|
Gui, Add, Text,cRed x%MarginSquared% y+15,WAV Filepath
|
||||||
|
else, { ; change text depending on if WAV or FLAC file
|
||||||
|
if(InStr(WavFilepath, ".flac"))
|
||||||
|
Gui, Add, Text,x%MarginSquared% y+15,FLAC Filepath
|
||||||
|
else,
|
||||||
|
Gui, Add, Text,x%MarginSquared% y+15,WAV Filepath
|
||||||
|
}
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vWavAudioFilepath,%WavAudioFilepath%
|
||||||
|
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectWAVFilepath, Select
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
if(MP3AudioFilepath = "")
|
||||||
|
Gui, Add, Text,cRed x%MarginSquared% y+15,Podcast MP3 Filepath
|
||||||
|
else,
|
||||||
|
Gui, Add, Text,x%MarginSquared% y+15,Podcast MP3 Filepath
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vMP3AudioFilepath,%MP3AudioFilepath%
|
||||||
|
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectMP3Filepath, Select
|
||||||
|
|
||||||
|
|
||||||
|
; Submit Button
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
gui, Font, Bold
|
||||||
|
|
||||||
|
; if(DevMode)
|
||||||
|
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Close
|
||||||
|
; else,
|
||||||
|
|
||||||
|
|
||||||
|
; Script Update Button
|
||||||
|
if(UpdateAvailable){
|
||||||
|
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Update Available!
|
||||||
|
; GuiButtonIcon(Icon, "shell32.dll", 278, "s20 a1 r2")
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
Gui, Add, Button, w%EditBoxHalfWidths% x%MarginSpace% gUpdateScript vUpdateAvailable h%SecondaryButtonHeights% center,Uploader Up-to-Date
|
||||||
|
; Gui, Add, Button, w%EditBoxHalfWidths% x+%Marginspace% vUpdateAvailable hwndIcon, Script is Up-to-Date
|
||||||
|
; GuiButtonIcon(Icon, "shell32.dll", 239, "s20 a1 r2")
|
||||||
|
|
||||||
|
}
|
||||||
|
; Gui, Font, s20
|
||||||
|
; Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
|
||||||
|
; Chrome Update Button
|
||||||
|
if(ChromeUpdateAvailable){
|
||||||
|
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Update Available!
|
||||||
|
}
|
||||||
|
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+25 h%MainButtonHeight% gCancelPost hwndIcon, Exit
|
||||||
|
; GuiButtonIcon(Icon, "imageres.dll",208, "s20 a1 r2")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(DevMode)
|
||||||
|
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
|
||||||
|
else,
|
||||||
|
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
|
||||||
|
|
||||||
|
Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder, Open Project Folder
|
||||||
|
|
||||||
|
|
||||||
|
if(DevMode){
|
||||||
|
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
|
||||||
|
Gui, Add, Button, x+%MarginSpace% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
|
||||||
|
LineSplitXPosition := PageTwoXStartPos - ( MarginSpace * 2)
|
||||||
|
gui, add, text, x%LineSplitXPosition% y20 h500 0x11 ; 0x11 is a "line" ; refer to here: https://autohotkey.com/board/topic/50910-draw-line-gui/
|
||||||
|
; Thumbnail Preview
|
||||||
|
Gui, Font, Normal
|
||||||
|
gui, Font, s4
|
||||||
|
; Miscellaneous Settings
|
||||||
|
DevModToggleButton := PageTwoXStartPos + 160
|
||||||
|
Gui, Add, Button, x%DevModToggleButton% y5 w50 h10 gToggleDevMode,DevMode
|
||||||
|
Gui, Add, Button, x+5 y5 w50 h10 gToggleTestingMode, Testing Mode
|
||||||
|
Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
|
||||||
|
; Settings Section
|
||||||
|
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
||||||
|
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, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
|
||||||
|
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
|
||||||
|
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
|
||||||
|
|
||||||
|
|
||||||
|
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
|
||||||
|
|
||||||
|
; -------------------------------PLATFORMS-------------------------------
|
||||||
|
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
|
||||||
|
|
||||||
|
; Msgbox % "LocalsURL: " LocalsURL
|
||||||
|
; if(VideoFileSizeInMB < 1792)
|
||||||
|
; Gui, Add, Checkbox, x+%MarginSpaceDoubled% vFacebook Checked%FacebookCheckStatus%, Facebook
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, xp+10 yp+25 vBitChute Checked%BitChuteCheckStatus% gUpdateVars, BitChute
|
||||||
|
|
||||||
|
|
||||||
|
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
||||||
|
; msgbox, checking grab url
|
||||||
|
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus% gUpdateVars, Locals (Grab URL)
|
||||||
|
LocalsGrabURL := 1
|
||||||
|
Locals := 0
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
; msgbox, checking locals
|
||||||
|
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocals Checked%LocalsCheckStatus% gUpdateVars, Locals
|
||||||
|
LocalsGrabURL := 0
|
||||||
|
Locals := 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus% gUpdateVars, Odysee Video
|
||||||
|
|
||||||
|
if(VideoFileSizeInMB < 50)
|
||||||
|
Gui, Add, Checkbox, vTelegram x+%MarginSpaceTripled% yp+0 Checked%TelegramCheckStatus% gUpdateVars, Telegram (>50 MB)
|
||||||
|
|
||||||
|
|
||||||
|
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus% gUpdateVars, Odysee Audio
|
||||||
|
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeAudioThumb Checked%OdyseeAudioThumbCheckStatus%, Thumbnail
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vRumble Checked%RumbleCheckStatus% gUpdateVars, Rumble
|
||||||
|
|
||||||
|
if(VideoTotalBitrate > 300000)
|
||||||
|
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
|
||||||
|
else,{
|
||||||
|
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSpace% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
||||||
|
}
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
|
||||||
|
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
|
||||||
|
|
||||||
|
; Gui, Font, s12
|
||||||
|
gui, Font, Bold
|
||||||
|
Gui, Add, GroupBox, r6.5 y+%MarginSpaceTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
|
||||||
|
gui, Font, Normal
|
||||||
|
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
|
||||||
|
|
||||||
|
|
||||||
|
gui, Font, Normal
|
||||||
|
gui, font, s7
|
||||||
|
Gui, Add, StatusBar,Center, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
|
||||||
|
|
||||||
|
|
||||||
|
; Show GUI to the user
|
||||||
|
Gui, +Resize +MaximizeBox
|
||||||
|
|
||||||
|
if(XPosition and YPosition)
|
||||||
|
Gui, Show, x%XPosition% y%YPosition%, %FullScriptName% - Upload Settings - %BodyTextFilePath%
|
||||||
|
else,
|
||||||
|
Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
|
||||||
|
|
||||||
|
ControlFocus, Edit4, %FullScriptName%
|
||||||
|
ToolTip
|
||||||
|
|
||||||
|
Return
|
@ -0,0 +1,135 @@
|
|||||||
|
;---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
|
||||||
|
|
||||||
|
|
||||||
|
; Menu, Tray, Icon, %A_scriptDir%\Assets\LBRY-Process-Killer.ico
|
||||||
|
|
||||||
|
;---Notes/Extra Info/#Includes------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
;---VARIABLES-----------------------------------------------------------------------
|
||||||
|
global DiscordWebhookBotURL
|
||||||
|
|
||||||
|
PassedParameter = %1%
|
||||||
|
if(PassedParameter = "Kill")
|
||||||
|
ExitApp
|
||||||
|
|
||||||
|
IniRead, DiscordWebhookBotURL, %A_scriptDir%\..\Settings.ini, General, DiscordWebhookBotURL, %A_Space%
|
||||||
|
if(DiscordWebhookBotURL = ""){
|
||||||
|
; msgbox, Unable to Read Settings.ini for DiscordWebhookBotURL.`nProgram will not be able to post seed status to Discord
|
||||||
|
; ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
;---MAIN SCRIPT---------------------------------------------------------------------
|
||||||
|
lbrynetlog_FP = C:\Users\%A_Username%\AppData\Local\lbry\lbrynet\lbrynet.log
|
||||||
|
if(!FileExist(lbrynetlog_FP)){
|
||||||
|
Message = lbrynet.log not found in the usual location. `nPlease submit issue on gitea to add functionality for custom locations.`nClick OK to open gitea page.
|
||||||
|
msgbox % Message
|
||||||
|
run, https://git.zinchuk.xyz/yuriy/LBRY-Process-Killer
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FileRead, lbrynetlogContents, C:\Users\%A_Username%\AppData\Local\lbry\lbrynet\lbrynet.log
|
||||||
|
if(lbrynetlogContents = ""){
|
||||||
|
Message = LBRYNet.log exists at normal location, but is currently empty. `nPlease submit issue on gitea about this error message `nClick OK to open gitea page and exit.
|
||||||
|
msgbox % Message
|
||||||
|
run, https://git.zinchuk.xyz/yuriy/LBRY-Process-Killer
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
; Msgbox % "lbrynetlogContents: " lbrynetlogContents
|
||||||
|
|
||||||
|
LogContentsArray := StrSplit(lbrynetlogContents, "`n")
|
||||||
|
OriginalArrayLenght := LogContentsArray.Length() ; Save total number of items in the array
|
||||||
|
|
||||||
|
Loop, 45 { ; 3.75 hours, if not complete by this time then exit
|
||||||
|
sleep, 300000 ; 5 minutes
|
||||||
|
; sleep, 60000
|
||||||
|
if(A_index = 6 OR A_index = 12 OR A_index = 24 OR A_index = 36 OR A_index = 48){ ; 30, 60, 120 minutes
|
||||||
|
Message = LBRY: Still waiting for Video to finish Uploading to Reflectors
|
||||||
|
PostProgressToDiscord(Message)
|
||||||
|
}
|
||||||
|
|
||||||
|
FileRead, lbrynetlogContents, C:\Users\%A_username%\AppData\Local\lbry\lbrynet\lbrynet.log
|
||||||
|
UpdatedLogContentsArray := StrSplit(lbrynetlogContents, "`n")
|
||||||
|
ArrayLenght := UpdatedLogContentsArray.Length() ; Count number of individual rows
|
||||||
|
|
||||||
|
Loop, %ArrayLenght% {
|
||||||
|
if(A_index < %OriginalArrayLenght%)
|
||||||
|
Continue ; Skip all lines that that were present in the original .log
|
||||||
|
|
||||||
|
CurrentLineContents := UpdatedLogContentsArray[A_index]
|
||||||
|
|
||||||
|
if(InStr(CurrentLineContents, "Finished sending reflector")){ ; Upload Complete Text on lbrylog
|
||||||
|
SeedingComplete := 1 ; mark seeding as complete and go to next loop
|
||||||
|
OriginalArrayLenght := A_index ; set variable to equal this loop number. So all lines up to this one get skipped next loop round
|
||||||
|
Continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if(InStr(CurrentLineContents, "Sent reflector blob")){ ; Means "Still Uploading" in LBRY API
|
||||||
|
SeedingComplete := 0 ; mark seeding as incomplete as there is still an upload in progress
|
||||||
|
Continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(SeedingComplete){
|
||||||
|
Process, Close, LBRY.exe ; terminate LBRY if it's running
|
||||||
|
|
||||||
|
if(DiscordWebhookBotURL){
|
||||||
|
Message = LBRY: Video Finished Seeding to Reflectors. LBRY Process Killed.
|
||||||
|
PostProgressToDiscord(Message)
|
||||||
|
}
|
||||||
|
|
||||||
|
ExitApp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;---FUNCTIONS-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PostProgressToDiscord(Message){
|
||||||
|
; Need to transform the message into a json string:
|
||||||
|
FormatTime, CurrentTime, YYYYMMDDHH24MISS, hh:mm
|
||||||
|
; Message := "-----------" . CurrentTime . "-----------" . "`n" . Message ; add a ------- to the top of the message to help split them up visually on discord
|
||||||
|
|
||||||
|
; Escape Backslashes
|
||||||
|
Message := StrReplace(Message, "", "\/")
|
||||||
|
|
||||||
|
; Escape quotation marks
|
||||||
|
SingleQuotationmark = "
|
||||||
|
ReplacedQuote = \"
|
||||||
|
Message := StrReplace(Message, SingleQuotationmark, ReplacedQuote)
|
||||||
|
|
||||||
|
; Escape New Character
|
||||||
|
Message := StrReplace(Message, "`n", "\n")
|
||||||
|
|
||||||
|
; Convert into json string
|
||||||
|
JsonString=
|
||||||
|
(
|
||||||
|
{
|
||||||
|
"content": "%Message%"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
try WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
|
||||||
|
try WebRequest.Open("POST", DiscordWebhookBotURL, false)
|
||||||
|
try WebRequest.SetRequestHeader("Content-Type", "application/json")
|
||||||
|
try WebRequest.Send(JsonString)
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 319 KiB |
@ -1,253 +0,0 @@
|
|||||||
|
|
||||||
; -------------------------------Functions-------------------------------
|
|
||||||
CheckLBRYProcess(){
|
|
||||||
; Check if LBRY Process exists
|
|
||||||
Process, Exist,LBRY.exe
|
|
||||||
if(ErrorLevel = 0) ; if doesn't exist
|
|
||||||
{
|
|
||||||
Message = Not Running. Starting up LBRY.exe
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
|
|
||||||
LBRYExeFilepath = C:\Program Files\LBRY\LBRY.exe
|
|
||||||
if(!FileExist(LBRYExeFilepath)){
|
|
||||||
Message = Failed to Find LBRY.exe executable. LBRY not installed?
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
Message = Checking LBRY daemon_settings.yml file for Odysee Wallet Servers
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
FileRead, daemon_settingsFileContent, C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings.yml
|
|
||||||
|
|
||||||
if(!InStr(daemon_settingsFileContent, "a-hub1.odysee.com")){
|
|
||||||
Message = Odysee wallet server is not in daemon_settings.yml. Replacing File with required settings.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",DiscordErrorLogging")
|
|
||||||
|
|
||||||
LBRYDaemonSettingsFP = C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings.yml
|
|
||||||
LBRYDaemonSettingsBackupFP = C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings_BU.yml
|
|
||||||
|
|
||||||
|
|
||||||
; Msgbox % "daemon_settingsText: " daemon_settingsText
|
|
||||||
FileMove, %LBRYDaemonSettingsFP%, %LBRYDaemonSettingsBackupFP%, 1 ; Dest [, Flag (1 = overwrite)]
|
|
||||||
|
|
||||||
UrlDownloadToFile, https://git.freedomainplaylists.com/yuriy/Freedomain-Video-Uploader/raw/branch/main/Assets/daemon_settings.yml , %LBRYDaemonSettingsFP%
|
|
||||||
|
|
||||||
sleep, 1000
|
|
||||||
|
|
||||||
if(!FileExist(LBRYDaemonSettingsFP)){
|
|
||||||
Message = Failed to download the custom daemon_settings.yml file from git. Restoring Original File
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
FileMove,%LBRYDaemonSettingsBackupFP%,%LBRYDaemonSettingsFP%, 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
try run, "%LBRYExeFilepath%"
|
|
||||||
Message = Waiting 1 Minute for LBRY to start up
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
||||||
Sleep, 60000 ; 1 minute
|
|
||||||
|
|
||||||
Process, Exist,LBRY.exe
|
|
||||||
if(ErrorLevel = 0) ; if doesn't exist
|
|
||||||
{
|
|
||||||
Message = Failed to Start LBRY.exe after 60 seconds of waiting
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
WinMinimize, LBRY
|
|
||||||
}
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GetPermanentLBRYURL(UploadResult){
|
|
||||||
SingleQuotationmark = "
|
|
||||||
|
|
||||||
UploadResult := StrSplit(UploadResult, "`n") ; split results by new line
|
|
||||||
|
|
||||||
; Iterate through the array of the results
|
|
||||||
Loop % UploadResult.Length() {
|
|
||||||
PermanentURL := UploadResult[A_Index]
|
|
||||||
if(InStr(PermanentURL, "permanent_url"))
|
|
||||||
Break
|
|
||||||
}
|
|
||||||
|
|
||||||
; Starting Result: "permanent_url": "lbry://Test-Video-161-Numbered#c9ad9afe54c7178d6f870b59bbe129aef8efc3ff",
|
|
||||||
PermanentURL := StrSplit(PermanentURL, "lbry:")
|
|
||||||
PermanentURL := "lbry:" . PermanentURL[2]
|
|
||||||
PermanentURL := StrReplace(PermanentURL, ",", "")
|
|
||||||
PermanentURL := StrReplace(PermanentURL, SingleQuotationmark, "")
|
|
||||||
PermanentURL := StrReplace(PermanentURL, "`n", "")
|
|
||||||
PermanentURL := StrReplace(PermanentURL, "`r", "")
|
|
||||||
|
|
||||||
; End Result lbry://Test-Video-161-Numbered#c9ad9afe54c7178d6f870b59bbe129aef8efc3ff
|
|
||||||
Return PermanentURL
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GetLBRYCanonicalURL(LBRYJSONObject){ ; input json string
|
|
||||||
; ResolveURL := StrSplit(LBRYResolveAPICommand, "lbry://")
|
|
||||||
; ResolveURL := "lbry://" . ResolveURL[2]
|
|
||||||
; StrReplace(Haystack, SearchText [, ReplaceText, OutputVarCount, Limit := -1])
|
|
||||||
LBRYPermanentURLJsonOBJ := StrReplace(LBRYJSONObject, LBRYPermanentURL, "LBRYPermanentURL")
|
|
||||||
; clipboard := LBRYPermanentURLJsonOBJ
|
|
||||||
; DevModeMsgBox(LBRYPermanentURLJsonOBJ)
|
|
||||||
|
|
||||||
try parsed := JSON.Load(LBRYPermanentURLJsonOBJ)
|
|
||||||
try LBRYCanonicalURL := parsed.LBRYPermanentURL.canonical_url
|
|
||||||
|
|
||||||
; DevModeMsgBox(LBRYCanonicalURL)
|
|
||||||
|
|
||||||
if(LBRYCanonicalURL = ""){
|
|
||||||
Return "" ; return blank
|
|
||||||
}
|
|
||||||
|
|
||||||
; otherwise return the LBRY url
|
|
||||||
LBRYCanonicalURL := StrReplace(LBRYCanonicalURL, "lbry://", "https://lbry.tv/")
|
|
||||||
Return LBRYCanonicalURL
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LBRYCMDTextReplacement(LBRYURLSlug){
|
|
||||||
SingleQUote = "
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, " ", "_") ; replace all spaces with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ":", "_") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ",", "_") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "?", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "!", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "`;", "_") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "/", "_") ; replace all colons with dashes
|
|
||||||
; LBRYURLSlug := StrReplace(LBRYURLSlug, "?", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "<", "_") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ">", "_") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, SingleQUote, "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "'", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "=", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ";", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ")", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "(", "") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "___", "_") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "__", "_") ; replace all colons with dashes
|
|
||||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "__", "_") ; replace all colons with dashes
|
|
||||||
Return LBRYURLSlug
|
|
||||||
}
|
|
||||||
|
|
||||||
GetLBRYAPIErrorFromString(UploadResult){
|
|
||||||
UploadResultArray := StrSplit(UploadResult, "message")
|
|
||||||
LBRYAPIError := UploadResultArray[2]
|
|
||||||
; LBRYAPIErrorStrLen := StrLen(LBRYAPIError)
|
|
||||||
|
|
||||||
; LBRYAPIErrorStrToTrim := LBRYAPIErrorStrLen - 3
|
|
||||||
; Msgbox % "LBRYAPIErrorStrToTrim: " LBRYAPIErrorStrToTrim
|
|
||||||
LBRYAPIError := SubStr(LBRYAPIError, 4)
|
|
||||||
LBRYAPIError := StrReplace(LBRYAPIError, "}", "")
|
|
||||||
|
|
||||||
|
|
||||||
; Msgbox % "LBRYAPIError: " LBRYAPIError
|
|
||||||
Return LBRYAPIError
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LogErrorToTextFile(Error){
|
|
||||||
/* if(LogErrorsToTextFile != 1)
|
|
||||||
Return
|
|
||||||
*/
|
|
||||||
ErrorLoggingFile := VideoFolderDir . "\" . "ErrorLogging.txt"
|
|
||||||
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
|
||||||
text =
|
|
||||||
(
|
|
||||||
|
|
||||||
|
|
||||||
---------------%TodayDate%---------------
|
|
||||||
%CurrentSite%: %Error%
|
|
||||||
|
|
||||||
|
|
||||||
)
|
|
||||||
if(LogErrorsToMsgbox)
|
|
||||||
Msgbox % "Text: " Text
|
|
||||||
|
|
||||||
FileAppend, %Text%, %ErrorLoggingFile%
|
|
||||||
} ; End of Function
|
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
AddToTotalVideosUploadedCount(){
|
|
||||||
; IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, %A_Space%
|
|
||||||
TotalVideosUploaded += 1
|
|
||||||
; IniWrite, %TotalVideosUploaded%, %SettingsIniFilepath%, General, TotalVideosUploaded
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OnMsgBoxPodcastFinish() {
|
|
||||||
DetectHiddenWindows, On
|
|
||||||
Process, Exist
|
|
||||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
|
||||||
WinMove,, 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
OnMsgBoxSocialMediaPoster() {
|
|
||||||
DetectHiddenWindows, On
|
|
||||||
Process, Exist
|
|
||||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
|
||||||
ControlSetText Button1, Yes
|
|
||||||
ControlSetText Button2, Not Now
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Check_For_Stuck_Video_Upload(Index_Number, Upload_Status){
|
|
||||||
if(A_index = 1){ ; Create a blank array
|
|
||||||
ProgressStatusArray := []
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
|
|
||||||
Message = Upload Status: %Upload_Status%
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
|
||||||
|
|
||||||
; if we reached the last loop number:
|
|
||||||
if(A_index = %Number_of_loops_to_Check_Upload_status%){
|
|
||||||
Message = Upload Most Likely Failed: Video Hasn't Finished Uploading after 1 hour.
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return "Failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
; If progress is still the same after a ten minute interval then error out
|
|
||||||
if(HasVal(Array_Index_Num_of_Upload_StatusChecks, A_index)){ ; if current index is in Array of index numbers to check status during
|
|
||||||
|
|
||||||
; Send a notification message of upload status
|
|
||||||
Message = Upload Status: %Upload_Status%
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
; if current upload_status is in the array of values that are updated every 10 mins
|
|
||||||
if(HasVal(ProgressStatusArray, Upload_Status)){
|
|
||||||
Message = Upload Failed (E#4508)`nUpload Stuck at same point for 10 minutes. Stuck Status: %ProgressStatus%
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return "Failed"
|
|
||||||
}
|
|
||||||
ProgressStatusArray.Push(Upload_Status) ; append current status to array
|
|
||||||
}
|
|
||||||
} ; end of func
|
|
||||||
|
|
||||||
|
|
||||||
; Find the longest word in a string of words
|
|
||||||
FindLongestWordInString(m, calloutNumber, pos, haystack, pattern){
|
|
||||||
Global wordLength, longestWord
|
|
||||||
|
|
||||||
len := StrLen(m)
|
|
||||||
|
|
||||||
If ( len > wordLength )
|
|
||||||
{
|
|
||||||
wordLength := len
|
|
||||||
longestWord := m
|
|
||||||
|
|
||||||
; MsgBox, %m%
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,3 @@
|
|||||||
|
[Video-Uploader]
|
||||||
|
Version=3.53
|
||||||
|
Name=Freedomain Video Uploader
|
Loading…
Reference in New Issue