Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 777cfaa242 | |||
| dd7c85e22e | |||
| ca0b6ce1b7 | |||
| a576a194c1 | |||
| 9cbe1410e5 | |||
| f339ede04c | |||
| 4f4361276f | |||
| 7acefafdc7 | |||
| 2cd1b0de84 | |||
| d01ce11347 | |||
| d546628d8a | |||
| 4940d18946 |
@@ -6,13 +6,20 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
|
||||
CoordMode, ToolTip, Screen
|
||||
CoordMode, Mouse, Screen
|
||||
FileEncoding, UTF-8-RAW ; Needed for special symbols that are used in video descritions
|
||||
|
||||
; Only Set tool tray icon if this is the source .ahk script.
|
||||
; The .exe has the icon compiled into it
|
||||
if(InStr(A_ScriptFullPath, ".ahk")){
|
||||
try Menu, Tray, Icon, %A_ScriptDir%\Assets\FreedomainVideo.ico
|
||||
}
|
||||
|
||||
; Parameter passed in to script
|
||||
; ------------------------------------------------
|
||||
PassedParameter = %1%
|
||||
|
||||
; Add menus to the toolbar icon
|
||||
|
||||
; Customize the Toolbar Icon Menu
|
||||
; ------------------------------------------------
|
||||
Menu, tray, NoStandard
|
||||
|
||||
Menu, Tray, Add, Exit, KillScript
|
||||
@@ -23,20 +30,12 @@ Menu, Tray, Add, Open New Project, ReloadScript
|
||||
Menu, Tray, Add, Restart with Last Project, RetryUpload
|
||||
Menu, Tray, Default, Restart with Last Project
|
||||
|
||||
|
||||
|
||||
global ScriptNameav
|
||||
global ScriptVersion
|
||||
global FullScriptName
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; Track how long sections of code take to run
|
||||
UStartTime := A_TickCount ; start time
|
||||
|
||||
; Included Files - These have to be included at the top for the Global variables to get registered early?
|
||||
; Included FIles and Libraries
|
||||
; ------------------------------------------------
|
||||
; These have to be included at the top for the Global variables to get registered early
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\General-Functions.ahk
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Selenium-Functions.ahk
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Chrome-Functions.ahk
|
||||
@@ -51,6 +50,9 @@ UStartTime := A_TickCount ; start time
|
||||
|
||||
;---Global Variables---
|
||||
;------------------------------------------------
|
||||
global ScriptNameav
|
||||
global ScriptVersion
|
||||
global FullScriptName
|
||||
global LBRYResolveAPICommand
|
||||
global LBRYPermanentURL
|
||||
global VideoTitle
|
||||
@@ -107,17 +109,14 @@ FileCreateDir, %ErrorLoggingFolder%
|
||||
global SettingsIniFilepath
|
||||
SettingsIniFilepath := A_ScriptDir . "\Settings.ini"
|
||||
|
||||
global ChangelogIniFilepath
|
||||
ChangelogIniFilepath := A_ScriptDir . "\Lib\FreedomScriptsChangelogINI"
|
||||
|
||||
global ScriptSettingsSection
|
||||
ScriptSettingsSection := "VideoUploader"
|
||||
|
||||
|
||||
FileInstall, Version.ini, %A_ScriptDir%\Lib\Version.ini, 1
|
||||
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,Video-Uploader, Version, 0.0
|
||||
IniRead, ScriptName, %A_ScriptDir%\Lib\Version.ini,Video-Uploader, Name, "Video Uploader"
|
||||
|
||||
ScriptName = Freedomain Video Uploader
|
||||
FullScriptName := ScriptName . " - " . ScriptVersion
|
||||
|
||||
|
||||
@@ -268,6 +267,12 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
||||
OriginalVideoDescription := VideoDescription
|
||||
}
|
||||
|
||||
if(FileNameWExt = "summary.txt"){
|
||||
FileRead, VideoSummary, %A_LoopFileFullPath%
|
||||
; DescriptionCharCount := StrLen(VideoDescription)
|
||||
OriginalVideoSummary := VideoSummary
|
||||
}
|
||||
|
||||
if(FileNameWExt = "keywords.txt"){
|
||||
FileRead, VideoTags, %A_LoopFileFullPath%
|
||||
FileRead, PodcastTags, %A_LoopFileFullPath%
|
||||
@@ -291,7 +296,7 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
||||
|
||||
}
|
||||
|
||||
if(FileExt = "png" OR FileExt = "jpg"){
|
||||
if(FileExt = "png" OR FileExt = "jpg" OR FileExt = "jpeg"){
|
||||
VideoThumbFilepath := A_LoopFileFullPath
|
||||
}
|
||||
}
|
||||
@@ -343,8 +348,8 @@ Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the direct
|
||||
VideoLinksIniFile = %VideoFolderDir%\VideoLinks.ini
|
||||
|
||||
if(FileExist(VideoLinksIniFile)){
|
||||
; IniRead, StreamanityURL, %VideoLinksIniFile%, URLs, StreamanityURL, %A_Space%
|
||||
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
||||
|
||||
; LBRY
|
||||
IniRead, LBRYURLSlug, %VideoLinksIniFile%, Misc, LBRYURLSlug, %A_Space%
|
||||
if(LBRYURLSlug = ""){
|
||||
@@ -372,7 +377,8 @@ if(FileExist(VideoLinksIniFile)){
|
||||
IniRead, DailyMotionURL, %VideoLinksIniFile%, URLs, DailyMotionURL, %A_Space%
|
||||
IniRead, PodcastNumber, %VideoLinksIniFile%, Misc, PodcastNumber, %A_Space%
|
||||
IniRead, LocalsURL, %VideoLinksIniFile%, URLs, LocalsURL, %A_Space%
|
||||
IniRead, FacebookURL, %VideoLinksIniFile%, URLs, FacebookURL, %A_Space%
|
||||
IniRead, PodcastTranscriptURL, %VideoLinksIniFile%, URLs, PodcastTranscriptURL, %A_Space%
|
||||
|
||||
|
||||
; MISC
|
||||
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
||||
@@ -439,7 +445,7 @@ TelegramCheckStatus := 0
|
||||
;---Testing Mode Overrides---
|
||||
;------------------------------------------------
|
||||
IniRead, TestingMode, %SettingsIniFilepath%, General, TestingMode, 0
|
||||
if(TestingMode){ ; save currently seelcted sites to ini file for next test
|
||||
if(TestingMode OR DevMode){ ; save currently seelcted sites to ini file for next test
|
||||
; IniRead, Streamanity, %SettingsIniFilepath%, Testing, Streamanity, %A_Space%
|
||||
; (Streamanity)?(StreamanityCheckStatus := 1) : (StreamanityCheckStatus := 0)
|
||||
IniRead, BitChute, %SettingsIniFilepath%, Testing, BitChute, %A_Space%
|
||||
@@ -482,341 +488,9 @@ if(PassedParameter = "ShowResults"){
|
||||
}
|
||||
|
||||
|
||||
;---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
|
||||
; Main GUI Window
|
||||
; ------------------------------------------------
|
||||
#include %A_scriptDir%\Modules\GUI-Main-Window.ahk
|
||||
|
||||
|
||||
; Write current project to ini file for easy reloading
|
||||
@@ -827,14 +501,9 @@ URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
;---Check for Updates---
|
||||
;------------------------------------------------
|
||||
; msgbox, checking for updates
|
||||
if(AutoUpdateCheck AND !UpdateAvailable){
|
||||
Message = Checking for Updates
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
; DevModeMsgBox("checking for updates")
|
||||
; msgbox, checkin for update
|
||||
; DevModeMsgBox(GitReleasesAPIURL)
|
||||
; UpdateAvailable :=
|
||||
|
||||
if(CheckForUpdates(GitReleasesAPIURL))
|
||||
GuiControl,,UpdateAvailable, Uploader Update Available!
|
||||
@@ -846,7 +515,6 @@ if(AutoUpdateCheck AND !UpdateAvailable){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; calculate run time and convert to seconds
|
||||
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
@@ -988,37 +656,9 @@ if(!status){
|
||||
|
||||
|
||||
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(){
|
||||
@@ -1144,7 +784,7 @@ IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||
|
||||
|
||||
; Log Basic info to the errorlogging file
|
||||
Message = %ScriptName% v%ScriptVersion%: Starting Upload `nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
||||
Message = Starting Upload with %ScriptName% v%ScriptVersion%:`nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
Message := "VideoTitle: " VideoTitle
|
||||
@@ -1168,16 +808,20 @@ SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
; Convert Video Title and Description into javascript formatting for sending to pages through js instead of plain selenium
|
||||
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
||||
|
||||
; -------------------------------/Log Info To Text-------------------------------
|
||||
|
||||
|
||||
; Cleanup Tag Formatting
|
||||
; ------------------------------------------------
|
||||
; @todo: note: it would be better to replace accented chars w/ their pure latin equivalents but that seems a bit
|
||||
; beyond the scope of this change. here's a link talking about how to do that tho
|
||||
; https://www.autohotkey.com/boards/viewtopic.php?t=61626
|
||||
|
||||
; Create an array out of the keywords to be used in different places
|
||||
VideoTagsArray := []
|
||||
PodcastTagsArray := []
|
||||
ArrayOfVideoTags := []
|
||||
ArrayOfPodcastTags := []
|
||||
|
||||
; VIDEO Tags
|
||||
For index, val in StrSplit(VideoTags, ",") {
|
||||
@@ -1186,7 +830,7 @@ For index, val in StrSplit(VideoTags, ",") {
|
||||
|
||||
; and remove any chars that are not a letter, number, or space (i = case-insensitive)
|
||||
val := RegexReplace(val, "i)[^a-z0-9 ]", "")
|
||||
VideoTagsArray.InsertAt(index, val)
|
||||
ArrayOfVideoTags.InsertAt(index, val)
|
||||
}
|
||||
|
||||
; PODCAST Tags
|
||||
@@ -1196,32 +840,32 @@ For index, val in StrSplit(PodcastTags, ",") {
|
||||
|
||||
; and remove any chars that are not a letter, number, or space (i = case-insensitive)
|
||||
val := RegexReplace(val, "i)[^a-z0-9 ]", "")
|
||||
PodcastTagsArray.InsertAt(index, val)
|
||||
ArrayOfPodcastTags.InsertAt(index, val)
|
||||
}
|
||||
|
||||
|
||||
; update VideoTags with sanitized keywords list
|
||||
VideoTags := Join(",", VideoTagsArray*)
|
||||
VideoTags := Join(",", ArrayOfVideoTags*)
|
||||
|
||||
; update PodcastTags with sanitized keywords list
|
||||
PodcastTags := Join(",", PodcastTagsArray*)
|
||||
PodcastTags := Join(",", ArrayOfPodcastTags*)
|
||||
|
||||
; // Cleanup Tag Formatting
|
||||
; ------------------------------------------------
|
||||
|
||||
|
||||
|
||||
; Upload to Sites
|
||||
; ------------------------------------------------
|
||||
; Call each submodule one by one
|
||||
; if errors occur then an upload for that site will be stopped and the next upload will then proceed
|
||||
|
||||
if(Telegram)
|
||||
gosub, TelegramVideoUpload
|
||||
|
||||
|
||||
if(Locals)
|
||||
gosub, LocalsUpload
|
||||
|
||||
|
||||
if(BitChute)
|
||||
Gosub, BitChuteUpload
|
||||
|
||||
|
||||
if(OdyseeVideo){
|
||||
LBRYUploadType := "Video"
|
||||
Gosub, LBRYVideoUpload
|
||||
@@ -1235,16 +879,13 @@ if(OdyseeAudio){
|
||||
if(Rumble)
|
||||
Gosub, RumbleUpload
|
||||
|
||||
|
||||
if(Brighteon)
|
||||
Gosub, BrighteonUpload
|
||||
|
||||
|
||||
if(DailyMotion)
|
||||
Gosub, DailyMotionUpload
|
||||
|
||||
|
||||
|
||||
; grab the LBRY Video/Audio URLs
|
||||
if(OdyseeVideo){
|
||||
LBRYUploadType := "Video"
|
||||
@@ -1258,6 +899,10 @@ if(OdyseeAudio){
|
||||
if(LocalsGrabURL){
|
||||
Gosub, LocalsGrabURL
|
||||
}
|
||||
; // Upload to Sites
|
||||
; ------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
if(URLOfLastErrorPage != ""){
|
||||
@@ -1284,26 +929,10 @@ Message = %Message%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
|
||||
; Read Info for Results Window GUI
|
||||
; ------------------------------------------------
|
||||
DisplayResults:
|
||||
|
||||
/*
|
||||
; i forget why i have it get the window position here
|
||||
WinGetPos, XPosition, YPosition, , , A
|
||||
Msgbox % "XPosition: " XPosition "`n" "YPosition: " YPosition
|
||||
|
||||
if(XPosition > 0 and YPosition > 0){ ; if gui doesn't exist, both are set to -8
|
||||
; Msgbox % "XPosition: " XPosition
|
||||
; Msgbox % "YPosition: " YPosition
|
||||
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
||||
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
Tooltip ; Remove all tooltips
|
||||
|
||||
Gui, Destroy ; destroy GUI in case we're going from the main screen to results without uploading.
|
||||
@@ -1347,99 +976,9 @@ if(PodcastNumber = "") {
|
||||
}
|
||||
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
; Gui, Add, Text,x10 y+10, Podcast #:
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastNumber, Podcast #
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% w%ResultEditBoxWidths% gUpdateVars vPodcastNumber, %PodcastNumber%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidths% gUpdateVars , %BitChuteURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBrighteonURL, Brighteon
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidths% gUpdateVars , %BrighteonURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyDailyMotionURL, DailyMotion
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidths% gUpdateVars , %DailyMotionURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeVideoURL, Odysee Video
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidths% gUpdateVars, %OdyseeVideoURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeAudioURL, Odysee Audio
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidths% gUpdateVars , %OdyseeAudioURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyRumbleURL, Rumble
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidths% gUpdateVars , %RumbleURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths%, Locals
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidths% gUpdateVars, %LocalsURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoTags vVideoTagsEdit, Video Tags
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidths% gUpdateVars , %VideoTags%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTags, Podcast Tags
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidths% gUpdateVars , %Podcasttags%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%Marginspace% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Description
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h50 vVideoDescription w%ResultEditBoxWidths% gUpdateVars , %VideoDescription%
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gUpdateINI, Save Modified Links
|
||||
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gUploadPodcast, Upload Podcast
|
||||
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxThirdsWidths% gPostToDiscord vPostToDiscordButton, Post to Discord
|
||||
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gPostToTelegram vPostToTelegramButton, Post to Telegram
|
||||
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gStartSocialMediaPoster, Start Social Media Poster
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxHalfWidths%gSendErrorLoggingThroughTelegram, Send Errorlog Through Telegram
|
||||
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gRetryUpload, Try Failed Again
|
||||
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gOpenLBRYBlobFilesFolder %ButtonWidths% , Open LBRY Blob Files Folder
|
||||
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gCancelPost %ButtonWidths% , Close
|
||||
; Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gKillScript %ButtonWidths% , Close
|
||||
; gui, Add, Text, y+10
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Add, Button, x%ErrorLogEditBoxXPos% w%ErrorLogEditBoxWidth% y%MarginSpace% h%ButtonHeights%, Error 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
|
||||
|
||||
OriginalVideoDescription := VideoDescription
|
||||
OriginalPodcastTags := PodcastTags
|
||||
|
||||
|
||||
if(XPosition and YPosition)
|
||||
Gui, Show,x%XPosition% y%YPosition%,%FullScriptName% - Upload Results
|
||||
else,
|
||||
Gui, Show,,%FullScriptName% - Upload Results
|
||||
; Show Results GUI Window
|
||||
; ------------------------------------------------
|
||||
#include %A_scriptDir%\Modules\GUI-Results-Window.ahk
|
||||
|
||||
SaveCurrentChromeVersionToIniFile()
|
||||
|
||||
@@ -1481,13 +1020,17 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
||||
Return
|
||||
|
||||
/*
|
||||
Sublime Indent Reset
|
||||
*/
|
||||
|
||||
; -------------------------------CopyThis-------------------------------
|
||||
CopyPodcastNumber:
|
||||
Clipboard := PodcastNumber
|
||||
SaveOrPostProgress(Message:=PodcastNumber "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
; Copy Info from GUI to Clipboard
|
||||
; ------------------------------------------------
|
||||
; @todo: this can be converted into 1 gosub, with if/else statements based on the button clicked
|
||||
|
||||
CopyPodcastTranscriptURL:
|
||||
Clipboard := PodcastTranscriptURL
|
||||
Message := PodcastTranscriptURL . "`nCopied to Clipboard"
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
sleep, 1000
|
||||
ToolTip
|
||||
Return
|
||||
@@ -1567,7 +1110,7 @@ Return
|
||||
; @todo: Add thumbnail status to this
|
||||
; @todo: add podcast tags to this
|
||||
UpdateINI:
|
||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, URLs, PodcastNumber
|
||||
IniWrite, %PodcastTranscriptURL%, %VideoLinksIniFile%, URLs, PodcastTranscriptURL
|
||||
IniWrite, %VideoTitle%, %VideoLinksIniFile%, Misc, VideoTitle
|
||||
IniWrite, %LocalsURL%, %VideoLinksIniFile%, URLs, LocalsURL
|
||||
IniWrite, %RumbleURL%, %VideoLinksIniFile%, URLs, RumbleURL
|
||||
@@ -1617,39 +1160,7 @@ ExitApp
|
||||
|
||||
|
||||
SendErrorLoggingThroughTelegram:
|
||||
Message = Uploading Errorlog to FDRBotTesting Telegram Server.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
; Credentials to FDRBotTesting Channel
|
||||
IniRead, TelegramErrorLogBotToken, %SettingsIniFilepath%, General, TelegramErrorLogBotToken, %A_Space%
|
||||
IniRead, TelegramErrorLogBotChatID, %SettingsIniFilepath%, General, TelegramErrorLogBotChatID, %A_Space%
|
||||
|
||||
|
||||
if(TelegramErrorLogBotToken = "" or TelegramErrorLogBotChatID = ""){
|
||||
Message = TelegramErrorLogBotToken and/or TelegramErrorLogBotChatID are blank. Please add them to Settings.ini under: `n`n[General]`nTelegramErrorLogBotToken=`nTelegramErrorLogBotChatID=
|
||||
}
|
||||
|
||||
|
||||
Status := SendTelegramFile(TelegramErrorLogBotToken, TelegramErrorLogBotChatID, ErrorLoggingFilePath, caption := "" )
|
||||
if(InStr(Status, "error_code")){
|
||||
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it manually.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
; SaveOrPostProgress(Message:=Status,PostType:=",ErrorLoggingTextFile")
|
||||
Message = Telegram Error: %Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
ToolTip
|
||||
Return
|
||||
}
|
||||
|
||||
Message = ErrorLog was successfully uploaded to the FDRBotTesting Telegram Server.`nThank You!
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
sleep, 5000
|
||||
ToolTip
|
||||
|
||||
msgbox, I don't do nothin atm
|
||||
Return
|
||||
|
||||
|
||||
@@ -1657,63 +1168,42 @@ Return
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Post-To-Telegram.ahk
|
||||
|
||||
|
||||
; Post-Video-To-Telegram
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Post-Video-To-Telegram.ahk
|
||||
|
||||
|
||||
; Post-To-Discord
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Post-To-Discord.ahk
|
||||
|
||||
|
||||
; BitChute
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Bitchute-Upload.ahk
|
||||
|
||||
|
||||
; Brighteon
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Brighteon-Upload.ahk
|
||||
|
||||
|
||||
; DailyMotion
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\DailyMotion-Upload.ahk
|
||||
|
||||
|
||||
; LBRY
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\LBRY-Upload.ahk
|
||||
|
||||
|
||||
; Rumble
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Rumble-Upload.ahk
|
||||
|
||||
|
||||
; Locals
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Locals-Upload.ahk
|
||||
|
||||
|
||||
; Podcast
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Podcast-Upload.ahk
|
||||
|
||||
|
||||
; Miscellaneous-Functions
|
||||
;------------------------------------------------
|
||||
#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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
||||
try TabUrl := driver.url
|
||||
if(InStr(TabUrl, "/accounts/login/")){
|
||||
if(AutoLogin){
|
||||
|
||||
|
||||
Xpath = (//button[normalize-space()='Submit'])[1]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
if(Status){
|
||||
@@ -122,17 +124,30 @@ Loop, 10 { ; Attempt to input video description a couple of times
|
||||
Message = Inputting Tags
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
; Convert tags into #hasthtags
|
||||
; Get first 3 tags from Video Tags array
|
||||
Loop, 3 {
|
||||
Value := KeywordsArray[A_Index]
|
||||
Value := StrReplace(Value, " ", "") ; Remove spaces if hashtag has two words
|
||||
; HashTag := "#" . Value
|
||||
BitchuteHashtags .= Value . " "
|
||||
BitchuteTags .= ArrayOfVideoTags[A_Index] . " "
|
||||
}
|
||||
|
||||
; input hashtags
|
||||
Message = Inputting Tags: %BitchuteTags%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
|
||||
; input Search Terms (Tags)
|
||||
Xpath = //input[@placeholder='Search Terms']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitchuteHashtags)
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitchuteTags)
|
||||
if(Status){
|
||||
Message = Failed to input search terms (tags)
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
js = return document.querySelector("#hashtags").value;
|
||||
try CurrentHashTagValue := driver.executeScript(JS) ;Execute Javascript
|
||||
if(CurrentHashTagValue = ""){
|
||||
Message = Tags that got input into page: %CurrentHashTagValue%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
|
||||
; Upload Thumbnail
|
||||
Message = Attaching Thumbnail
|
||||
|
||||
@@ -8,7 +8,8 @@ Return
|
||||
|
||||
|
||||
JSBrighteonVideoDescription := FormatTextToJSText(VideoDescription)
|
||||
; Msgbox % "JSBrighteonVideoDescription: " JSBrighteonVideoDescription
|
||||
|
||||
|
||||
|
||||
; descriptions longer than 5k characters just fail to get input so trim them to below 5000 characters
|
||||
if(StrLen(VideoDescription) >= 5000){
|
||||
@@ -112,6 +113,10 @@ try driver.FindElementByXPath(Xpath).click()
|
||||
|
||||
CheckForAlerts()
|
||||
|
||||
if(BrighteonUploadAttempt){
|
||||
Sleep, 2000
|
||||
}
|
||||
|
||||
Message = Uploading Video
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
; Upload Video
|
||||
@@ -133,6 +138,25 @@ loop, 3 {
|
||||
}
|
||||
|
||||
|
||||
; input with js. Doesn't work in production, but does in the ConnectActiveTab script
|
||||
/*
|
||||
SaveOrPostProgress(Message:="Inputting title with JS",PostType:="Tooltip")
|
||||
|
||||
; Input Title of the Video
|
||||
js = document.querySelector("#name").value = "%JSVideoDescription%";
|
||||
driver.executeScript(JS) ;Execute Javascript
|
||||
|
||||
SaveOrPostProgress(Message:="Waiting 5 seconds to check if input was saved",PostType:="Tooltip")
|
||||
sleep, 5000
|
||||
|
||||
Xpath = //input[@id='name']
|
||||
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.SPACE)
|
||||
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.BACKSPACE) ;Sends Variable to an Xpath Item
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
; Input Title of the Video
|
||||
Xpath = //input[@id='name']
|
||||
try driver.FindElementByXPath(Xpath).SendKeys(VideoTitle) ;Sends Variable to an Xpath Item
|
||||
@@ -162,13 +186,24 @@ loop, 3 {
|
||||
|
||||
TooltipThis("Inputting Video Description")
|
||||
|
||||
|
||||
|
||||
; Attempt to input video description a couple of times
|
||||
; Attempt to input video description multiple time in case Brighteon rejects the input
|
||||
Loop, 10 {
|
||||
if(A_index = 10){
|
||||
Message = Failed to input Video Description after 10 attempts.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
if(!BrighteonUploadAttempt){
|
||||
|
||||
Message = Re-Trying Entire Upload
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
BrighteonUploadAttempt := 2
|
||||
goto, BrighteonUpload
|
||||
}
|
||||
|
||||
Message = Brighteon Upload Failed after 2 seperate individual attempts. Please try uploading manually and report any errors.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return
|
||||
}
|
||||
@@ -177,9 +212,6 @@ Loop, 10 {
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="DiscordErrorLogging")
|
||||
|
||||
; SaveOrPostProgress(Message:="Inputting Video Description",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar")
|
||||
; TooltipThis("Inputting Description)
|
||||
|
||||
Xpath = //div[@class='e-content e-lib e-keyboard']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoDescription)
|
||||
if(Status){
|
||||
@@ -188,23 +220,10 @@ Loop, 10 {
|
||||
; Return
|
||||
}
|
||||
|
||||
; DevModeMsgBox("pause")
|
||||
|
||||
; driver.FindElementByXPath(Xpath).SendKeys(VideoDescription)
|
||||
|
||||
; js = document.getElementById('description').value = "%JSBrighteonVideoDescription%";
|
||||
; try driver.executeScript(js)
|
||||
|
||||
|
||||
; sleep, 1000
|
||||
; TooltipThis("checking description input")
|
||||
; try driver.findElementsByID("description").item[1].SendKeys(driver.Keys.ENTER)
|
||||
; sleep, 1000
|
||||
|
||||
sleep, 5000
|
||||
|
||||
|
||||
js = return document.querySelector("div[class='e-content e-lib e-keyboard'] p").innerText;
|
||||
; get text that was input into description box
|
||||
js = return document.querySelector("#richtexteditor_747903514_0rte-view").innerText;
|
||||
try Input_Description := driver.executeScript(JS) ;Execute Javascript
|
||||
|
||||
Input_DescriptionStrLen := StrLen(Input_Description)
|
||||
@@ -218,11 +237,9 @@ Loop, 10 {
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
Break
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
; Thumbnail
|
||||
if(VideoThumbFilepath != "") {
|
||||
TooltipThis("Uploading Thumbnail")
|
||||
@@ -236,13 +253,15 @@ if(VideoThumbFilepath != "") {
|
||||
|
||||
|
||||
; Brighteon has a max of 25 for tags.
|
||||
if(VideoTagsArray.Length() > 25){
|
||||
if(ArrayOfVideoTags.Length() > 25){
|
||||
Loop % 24 {
|
||||
BrighteonKeywords := VideoTagsArray[A_Index]
|
||||
BrighteonKeywords := ArrayOfVideoTags[A_Index]
|
||||
}
|
||||
}
|
||||
else,
|
||||
BrighteonKeywords := VideoTags
|
||||
else,
|
||||
BrighteonKeywords := VideoTags
|
||||
|
||||
|
||||
|
||||
TooltipThis("Inputting Keywords")
|
||||
Loop, 5 {
|
||||
@@ -269,7 +288,6 @@ Loop, 5 {
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
break
|
||||
}
|
||||
; Msgbox % "status: " status
|
||||
|
||||
|
||||
}
|
||||
@@ -378,7 +396,6 @@ Loop % VideoTitleArray.Length(){
|
||||
if(StrLen(VideoTitleLongWord) > 4)
|
||||
Break
|
||||
|
||||
; MsgBox % VideoTitleArray[A_Index]
|
||||
}
|
||||
|
||||
|
||||
@@ -400,23 +417,6 @@ Loop, 4 {
|
||||
jsCheck = return document.getElementsByClassName('col')[%ElementIndexNumber%].textContent;
|
||||
try InnerText := driver.executeScript(jsCheck)
|
||||
|
||||
; Message = Loop Number: %ElementIndexNumber% element's Text Content: %innerText%`nBrighteonURL: %BrighteonURL%
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
; Message = InnerText: %InnerText%
|
||||
; SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
; DevModeMsgBox(InnerText)
|
||||
|
||||
; Message = BrighteonURL: %BrighteonURL%
|
||||
; SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
|
||||
|
||||
; Msgbox % "VideoTitleLongWord: " VideoTitleLongWord "`nInnerText: " InnerText
|
||||
; clipboard := Message
|
||||
; msgbox % Message
|
||||
; Msgbox % "InnerText: " InnerText . "`n" . "BrighteonURL: " . BrighteonURL
|
||||
|
||||
if(InStr(InnerText, VideoTitleLongWord)){
|
||||
Message = Title Keyword was found on %A_index% loop, within element: %innerText%`nTrying to pull out BrighteonURL from element's outerHTML
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
@@ -440,10 +440,6 @@ Loop, 4 {
|
||||
}
|
||||
|
||||
|
||||
|
||||
; Convert dashboard URL to Public URL
|
||||
; BrighteonURL := StrReplace(BrighteonURL, "dashboard/videos/", "")
|
||||
|
||||
if(BrighteonURL = ""){
|
||||
Message = Upload Completed Successfully but failed to grab Share URL. Please Copy and Paste it in.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
@@ -39,7 +39,7 @@ if(LoggedOutStatus){
|
||||
try driver.FindElementByXPath(Xpath).click()
|
||||
|
||||
js = document.querySelector("button[type='submit']").click();
|
||||
driver.executeScript(js)
|
||||
try driver.executeScript(js)
|
||||
|
||||
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||
sleep, 1000
|
||||
@@ -243,13 +243,22 @@ Message = Inputting Tags
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
; Append comma to end of tags
|
||||
; DailyMotion page automtically splits the tags into their little boxes when they're seperated by commas
|
||||
DailyMotionVideoTags := VideoTags . ","
|
||||
; DailyMotion page automtically splits the tags into individual tags when they're seperated by commas
|
||||
|
||||
; Iterate from one end of the array to another:
|
||||
Loop % VideoTagsArray.Length(){
|
||||
; ArrayItem := ARRAY[A_Index]
|
||||
; MsgBox %
|
||||
DailyMotionVideoTags .= VideoTagsArray[A_Index] . ","
|
||||
}
|
||||
|
||||
|
||||
; DailyMotionVideoTags := VideoTags . ","
|
||||
|
||||
Message = Video Tags: %DailyMotionVideoTags%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
Xpath = //div[@class='ant-select-selection-search']//input[@role='combobox']
|
||||
Xpath = (//input[@id='tags'])[1]
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=DailyMotionVideoTags)
|
||||
|
||||
; double check the input
|
||||
@@ -259,14 +268,12 @@ Message = Tags that got input: %inputTags% (Will be doubled b/c of js)
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
; msgbox
|
||||
Message = Clicking Next Button to Move on to next input screen
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
Xpath = //button[@type='button']//span[contains(text(),'Next')]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
|
||||
; msgbox, click work?
|
||||
|
||||
Message = Selecting "Not For Kids" checkbox
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
@@ -303,51 +310,6 @@ if(Status){
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
; Disable monitization for video
|
||||
SaveOrPostProgress(Message:="Unchecking monetizaton checkbox",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Xpath = //button[normalize-space()='Advanced'] ; advanced tab button
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000)
|
||||
if(Status = "Failed"){
|
||||
Message = Unable to Navigate to Advanced Settings Page to turn off monetization
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
; SaveOrPostProgress(Message:="Unchecking monetizaton checkbox",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
; switch over to advanced tab
|
||||
; js = document.getElementsByName('advanced')[0].click();
|
||||
; try driver.executeScript(js)
|
||||
/*
|
||||
|
||||
sleep, 1000
|
||||
Loop, 5 { ; Loop to uncheck the "monetization button"
|
||||
|
||||
if(A_index = 5){
|
||||
Message = Failed to uncheck "monetization enabled" checkbox
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
Xpath = //input[@name='advertising_instream_blocked'] ; monetization checkbox
|
||||
try Status := driver.FindElementByXPath(Xpath).isSelected()
|
||||
|
||||
if(Status = 0) ; -1 is checked, 0 is unchecked
|
||||
Break
|
||||
|
||||
; Click to uncheck the "allow monetization" checkbox
|
||||
Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
; Switch back to Basic tab
|
||||
js = document.getElementsByName('basic')[0].click();
|
||||
try driver.executeScript(js)
|
||||
|
||||
*/
|
||||
|
||||
Message = Clicking Next Button to Move on to third video settings screen
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
@@ -355,7 +317,6 @@ Xpath = //button[@type='button']//span[contains(text(),'Next')]
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
|
||||
|
||||
|
||||
Message = Clicking Save Button to Finalize Upload
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
328
Modules/GUI-Main-Window.ahk
Normal file
328
Modules/GUI-Main-Window.ahk
Normal file
@@ -0,0 +1,328 @@
|
||||
;---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 := EditBoxHalfWidths - 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%
|
||||
|
||||
; Description/Summary Headers
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Description
|
||||
Gui, Add, Text,yp+0 x%ColumnOneHalfWidthXPos%,Summary
|
||||
|
||||
Gui, Font, Normal
|
||||
; Video Description edit box
|
||||
Gui, Add, Edit,x%Marginspace% 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%Marginspace% y+5 vDescriptionCharCount, %DescriptionCharCount%
|
||||
Gui, Add,Text, yp+4 x+%MarginSpace%,Limits: DM+Bitchute = 3K, Odysee, Brighteon = 5K
|
||||
; Gui, font, Bold
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, font, Bold
|
||||
|
||||
|
||||
|
||||
Gui, Add, GroupBox,r8.5 x%MarginSpace% 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+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 of Actions
|
||||
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
|
||||
|
||||
|
||||
; 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
|
||||
93
Modules/GUI-Results-Window.ahk
Normal file
93
Modules/GUI-Results-Window.ahk
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTranscriptURL,Transcript URL
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% w%ResultEditBoxWidths% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidths% gUpdateVars , %BitChuteURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBrighteonURL, Brighteon
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidths% gUpdateVars , %BrighteonURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyDailyMotionURL, DailyMotion
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidths% gUpdateVars , %DailyMotionURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeVideoURL, Odysee Video
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidths% gUpdateVars, %OdyseeVideoURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeAudioURL, Odysee Audio
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidths% gUpdateVars , %OdyseeAudioURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyRumbleURL, Rumble
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidths% gUpdateVars , %RumbleURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths%, Locals
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidths% gUpdateVars, %LocalsURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoTags vVideoTagsEdit, Video Tags
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidths% gUpdateVars , %VideoTags%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTags, Podcast Tags
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidths% gUpdateVars , %Podcasttags%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%Marginspace% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Description
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+5 yp+0 h50 vVideoDescription w%ResultEditBoxWidths% gUpdateVars , %VideoDescription%
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gUpdateINI, Save Modified Links
|
||||
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gUploadPodcast, Upload Podcast
|
||||
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxThirdsWidths% gPostToDiscord vPostToDiscordButton, Post to Discord
|
||||
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gPostToTelegram vPostToTelegramButton, Post to Telegram
|
||||
Gui, Add, Button, x+5 w%ResultEditBoxThirdsWidths% gStartSocialMediaPoster, Start Social Media Poster
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSpace% w%ResultEditBoxHalfWidths% gSendErrorLoggingThroughTelegram,
|
||||
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gRetryUpload, Try Failed Again
|
||||
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gOpenLBRYBlobFilesFolder %ButtonWidths% , Open LBRY Blob Files Folder
|
||||
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gCancelPost %ButtonWidths% , Close
|
||||
; Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gKillScript %ButtonWidths% , Close
|
||||
; gui, Add, Text, y+10
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Add, Button, x%ErrorLogEditBoxXPos% w%ErrorLogEditBoxWidth% y%MarginSpace% h%ButtonHeights%, Error 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
|
||||
|
||||
OriginalVideoDescription := VideoDescription
|
||||
OriginalPodcastTags := PodcastTags
|
||||
|
||||
|
||||
if(XPosition and YPosition)
|
||||
Gui, Show,x%XPosition% y%YPosition%,%FullScriptName% - Upload Results
|
||||
else,
|
||||
Gui, Show,,%FullScriptName% - Upload Results
|
||||
340
Modules/GUI-Windows.ahk
Normal file
340
Modules/GUI-Windows.ahk
Normal file
@@ -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
|
||||
@@ -91,7 +91,7 @@ if(LBRYURLSlug = "" OR LBRYURLSlug = "_Audio"){
|
||||
|
||||
; loops through array and creates a string of: --tags="tag1" --tags="tag2" --tags="tag3" so that it can be passed to lbrynet
|
||||
Loop % KeywordsArray.Length(){
|
||||
LBRYTags .= "--tags=" . SingleQuotationmark KeywordsArray[A_Index] . SingleQuotationmark . " "
|
||||
LBRYTags .= "--tags=" . SingleQuotationmark ArrayOfVideoTags[A_Index] . SingleQuotationmark . " "
|
||||
}
|
||||
|
||||
; Msgbox % "FilePathForLBRYAPI: " FilePathForLBRYAPI
|
||||
|
||||
@@ -13,14 +13,10 @@ if(LocalsPostPageURL = ""){
|
||||
Return
|
||||
}
|
||||
|
||||
if(!InStr(LocalsPostPageURL, "/share/post")){
|
||||
LocalsPostPageURL .= "/share/post"
|
||||
if(InStr(LocalsPostPageURL, "/share/post")){
|
||||
LocalsPostPageURL := StrReplace(LocalsPostPageURL, "/share/post", "")
|
||||
}
|
||||
|
||||
; replace any double slashes that migth have come from the combining
|
||||
; LocalsPostPageURL := StrReplace(LocalsPostPageURL, "//", "/")
|
||||
|
||||
|
||||
Status := NavigateFromBaseURLTo(LocalsPostPageURL)
|
||||
if(Status)
|
||||
Return
|
||||
@@ -44,71 +40,44 @@ if(Status){
|
||||
Return
|
||||
}
|
||||
}
|
||||
/*
|
||||
Message = Inputting Title
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
Xpath = //input[@id='title']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000,StringTextContent:=VideoTitle)
|
||||
if(Status){
|
||||
Message = Failed to input Title
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
sleep, 1000
|
||||
*/
|
||||
|
||||
|
||||
|
||||
TooltipThis("Inputting Title")
|
||||
Loop, 5 { ; Attempt to input video description a couple of times
|
||||
|
||||
|
||||
if(A_index = 5){
|
||||
; Clipboard := VideoDescription
|
||||
Message = Failed to input Video Title
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
js = document.querySelector("#title").value = "%JSVideoTitle%"; ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
||||
try driver.executeScript(js) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||
|
||||
; msgbox
|
||||
; try driver.findElementsByName("body").item[1].SendKeys(driver.Keys.SPACE)
|
||||
; driver.findElementsByID("ELEMENTID").item[1].SendKeys(driver.Keys.ENTER)
|
||||
; msgbox
|
||||
|
||||
jsCheck = return document.querySelector("#title").value; ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
||||
try VideoTitle := driver.executeScript(jsCheck) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||
|
||||
|
||||
; try Description := driver.findElementsByName("body").item[1].Attribute("value") ;XPath: ID=site-title & span tag
|
||||
if(VideoTitle != "")
|
||||
Break
|
||||
sleep, 2000
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*Xpath = //textarea[@id='body']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=5,SleepLength:=1000,StringTextContent:=VideoDescription)
|
||||
if(Status){
|
||||
Message = Failed to input Body
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
}
|
||||
*/
|
||||
|
||||
; Input Description
|
||||
TooltipThis("Inputting Description")
|
||||
TooltipThis("Inputting Title")
|
||||
Loop, 5 { ; Attempt to input video description a couple of times
|
||||
|
||||
|
||||
if(A_index = 5){
|
||||
; Clipboard := VideoDescription
|
||||
Message = Failed to input Video Title
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
js = document.querySelector("#title").value = "%JSVideoTitle%"; ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
||||
try driver.executeScript(js) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||
|
||||
; msgbox
|
||||
; try driver.findElementsByName("body").item[1].SendKeys(driver.Keys.SPACE)
|
||||
; driver.findElementsByID("ELEMENTID").item[1].SendKeys(driver.Keys.ENTER)
|
||||
; msgbox
|
||||
|
||||
jsCheck = return document.querySelector("#title").value; ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
||||
try VideoTitle := driver.executeScript(jsCheck) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||
|
||||
|
||||
; try Description := driver.findElementsByName("body").item[1].Attribute("value") ;XPath: ID=site-title & span tag
|
||||
if(VideoTitle != "")
|
||||
Break
|
||||
sleep, 2000
|
||||
}
|
||||
|
||||
|
||||
|
||||
; Input Video Description
|
||||
; ------------------------------------------------
|
||||
TooltipThis("Inputting Description")
|
||||
Loop, 5 {
|
||||
|
||||
|
||||
if(A_index = 5){
|
||||
Clipboard := VideoDescription
|
||||
Message = Unable to Input Video Description`nDescription copied to clipboard, please paste it in at your earliest convenience.
|
||||
@@ -119,10 +88,7 @@ Loop, 5 { ; Attempt to input video description a couple of times
|
||||
js = document.getElementsByName('body')[0].value = "%JSVideoDescription%"; ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
||||
try driver.executeScript(js) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||
|
||||
; msgbox
|
||||
try driver.findElementsByName("body").item[1].SendKeys(driver.Keys.SPACE)
|
||||
; driver.findElementsByID("ELEMENTID").item[1].SendKeys(driver.Keys.ENTER)
|
||||
; msgbox
|
||||
|
||||
jsCheck = return document.getElementsByName('body')[0].value; ; Send content through javascript (Great for getting around emoji chrome limitaitons)
|
||||
try Description := driver.executeScript(jsCheck) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||
@@ -149,9 +115,6 @@ if(Status){
|
||||
; check if the "Auto Submit Post" checkbox is checked, and if not check it
|
||||
js = return document.querySelector("#autosubmit_enabled").checked;
|
||||
try AutoSubmitstatus := driver.executeScript(js)
|
||||
; DevModeMsgBox(status)
|
||||
; message = AutoSubmitstatus: %AutoSubmitstatus%
|
||||
; DevModeMsgBox(message)
|
||||
|
||||
if(AutoSubmitstatus = "0"){
|
||||
js = document.querySelector("li[id='autosubmit_container'] small").click() ; ; CHECK YES
|
||||
@@ -174,8 +137,6 @@ if(AutoSubmitstatus = "0"){
|
||||
}
|
||||
|
||||
|
||||
; DevModeMsgBox("autosubmit status -1 string here")
|
||||
; msgbox % AutoSubmitstatus = "-1"
|
||||
if(AutoSubmitstatus = "-1"){ ; if checked YES
|
||||
|
||||
; check that there are no error messages
|
||||
@@ -215,16 +176,6 @@ if(AutoSubmitstatus = "-1"){ ; if checked YES
|
||||
IniWrite, %LocalsURL%, %VideoLinksIniFile%, URLs, LocalsURL
|
||||
AddToTotalVideosUploadedCount()
|
||||
|
||||
; Msgbox % "LocalsURL: " LocalsURL
|
||||
; Msgbox % "VideoLinksIniFile: " VideoLinksIniFile
|
||||
;
|
||||
; FileRead, inicontents, %VideoLinksIniFile% ; , Filename
|
||||
; Msgbox % "inicontents: " inicontents
|
||||
|
||||
; IniWrite, Value, Filename, Section, Key
|
||||
|
||||
; LocalsTabURL := SaveDriverURL()
|
||||
|
||||
; Set variable so that URL gets grabbed later in the upload
|
||||
LocalsGrabURL := 1
|
||||
|
||||
@@ -249,7 +200,7 @@ Return
|
||||
LocalsGrabURL:
|
||||
|
||||
CurrentSite := "Locals"
|
||||
|
||||
; msgbox, pause
|
||||
SaveOrPostProgress(Message:="Navigating to Locals Feed to grab URL",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
@@ -271,7 +222,6 @@ if(Status = "Failed"){
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
; Msgbox % "Status: " Status
|
||||
|
||||
|
||||
try currentpageURL := driver.url
|
||||
@@ -340,25 +290,32 @@ Loop % VideoTitleArray.Length(){
|
||||
; get longest word in video title to use for grabbing the share link from the raw page
|
||||
RegExMatch(VideoTitle, "ms)\b\S+(?CFindLongestWordInString)\b(?R)", m)
|
||||
LongestWordInVideoTitle := longestWord
|
||||
; Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
||||
Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
||||
|
||||
; MsgBox, Longest word: %longestWord%`, #%wordLength%
|
||||
|
||||
|
||||
|
||||
|
||||
; Grab Video Share Link From Page Source
|
||||
; ------------------------------------------------
|
||||
; Iterate over the last couple of posts, find the post with the title that contains the Longest word from the uploaded video
|
||||
; And grab the share URL for it
|
||||
|
||||
Message = Looking for - %LongestWordInVideoTitle% - within first 7 posts in order to grab share URL
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
loop, 7 {
|
||||
ElementIndexNum := A_index - 1
|
||||
Message = ElementIndexNum: %ElementIndexNum%
|
||||
DevModeMsgBox(Message)
|
||||
; Msgbox % "ElementIndexNum: " ElementIndexNum
|
||||
|
||||
|
||||
jscheck = return document.getElementsByClassName('post-bottom')[%ElementIndexNum%].outerHTML;
|
||||
try outerHTML := driver.executeScript(jsCheck)
|
||||
|
||||
; clipboard := outerHTML
|
||||
; Msgbox % "outerHTML: " outerHTML
|
||||
|
||||
if(DevMode){
|
||||
Message = Looking for LongestWordInVideoTitle: %LongestWordInVideoTitle% `nwithin outerHTML: %outerHTML%
|
||||
DevModeMsgBox(message)
|
||||
@@ -366,6 +323,8 @@ loop, 7 {
|
||||
; DevModeMsgBox(outerHTML)
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(InStr(OuterHTML,LongestWordInVideoTitle)){
|
||||
|
||||
; @todo replace with regex
|
||||
@@ -406,9 +365,6 @@ if(ShareLink = ""){
|
||||
Return
|
||||
}
|
||||
|
||||
; DevModeMsgBox(ShareLink)
|
||||
|
||||
; ShareLink := "Successful"
|
||||
|
||||
Message = Upload Complete: %ShareLink%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
@@ -421,253 +377,9 @@ SaveDriverURL()
|
||||
|
||||
|
||||
Return
|
||||
|
||||
|
||||
|
||||
;--------------/LocalsGrabURL----------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; GetLocals
|
||||
; Xpath = //div[@class='uppy-StatusBar-statusPrimary']
|
||||
|
||||
; sleep, 30000 ; wait 30 seconds
|
||||
; sleep, 2000
|
||||
|
||||
/*; Attach Custom Thumbnail
|
||||
if(VideoThumbFilepath != ""){
|
||||
Message = Attaching Custom Thumbnail
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
Xpath = //div[@class='custom-thumb-uploader']//input[@name='Filedata']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoThumbFilepath)
|
||||
|
||||
if(Status){
|
||||
Message = Failed to Attach Custom Thumbnail
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
sleep, 10000
|
||||
Loop, %Number_of_loops_to_Check_Upload_status% {
|
||||
sleep, %Time_Between_Loops_Upload_Status%
|
||||
|
||||
jscheck = return document.getElementsByClassName('uppy-StatusBar-statusPrimary')[0].textContent;
|
||||
try UploadStatus := driver.executeScript(jsCheck)
|
||||
|
||||
; UploadStatus := StrSplit(UploadStatus, ": ")
|
||||
; UploadStatus := UploadStatus[2]
|
||||
|
||||
|
||||
; message = Waiting for Video To Finish Uploading. `nCurrent Status: %UploadStatus%
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
|
||||
; Clipboard := jsCheck
|
||||
; msgbox % "textContent: " . textContent
|
||||
|
||||
|
||||
/* try UploadStatus := driver.findelementbyxpath(Xpath).Attribute("innerText") ; Grabb innertext
|
||||
catch e {
|
||||
if(A_index = 1){
|
||||
Message = Unable to find Progress Upload Percentage. Upload Most Likely Failed.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
}
|
||||
else,
|
||||
Break
|
||||
}
|
||||
*/
|
||||
|
||||
if(InStr(UploadStatus, "100%")){
|
||||
Message = Video Upload Complete. Waiting 20 seconds for Video to finalize before submitting.
|
||||
sleep, 20000
|
||||
break
|
||||
}
|
||||
|
||||
; if(UploadStatus != ""){
|
||||
; Message =
|
||||
; sleep, 30000 ; 30 seconds
|
||||
; Continue
|
||||
|
||||
; }
|
||||
|
||||
if(UploadStatus = "" and A_index = 1){
|
||||
Message = Upload Failed. Unable to Grab Upload Status
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return
|
||||
}
|
||||
|
||||
; if(UploadStatus = ""){
|
||||
; Break
|
||||
; }
|
||||
|
||||
|
||||
Status := Check_For_Stuck_Video_Upload(A_index, UploadStatus)
|
||||
if(Status = "Failed")
|
||||
Return
|
||||
}
|
||||
|
||||
/*; attach custom thumbnail
|
||||
xpath = //label[normalize-space()='Upload Custom Video Thumbnail']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoThumbFilepath)
|
||||
if(Status){
|
||||
Message = Failed to Attach Thumbnail
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
; SaveDriverURLOFErrorPage()
|
||||
; Return
|
||||
}
|
||||
Status := InputFilePathIntoOpenWindow(VideoThumbFilepath)
|
||||
|
||||
*/
|
||||
|
||||
; DevModeMsgBox("pause")
|
||||
|
||||
; Click the publish button
|
||||
js = document.getElementsByName('submitPost')[0].click();
|
||||
try driver.executeScript(js)
|
||||
|
||||
|
||||
Message = Waiting 5 seconds for Video to Get Processed
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
sleep, 5000
|
||||
|
||||
|
||||
try currentpage := driver.url
|
||||
if(CUrrentpage = LocalsPostPageURL){
|
||||
Message = Final page is same as post page. Please double check if post was published successfully.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
; sleep, 500
|
||||
; ToolTip
|
||||
; AddToTotalPostsPostedCount()
|
||||
|
||||
|
||||
Devmodeskip:
|
||||
|
||||
Message = Trying to Grab Share Link
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
; refresh page
|
||||
try driver.executeScript("history.go(0)")
|
||||
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||
|
||||
; check for "Retrieve Draft button"
|
||||
js = return document.querySelector("a[class='btn']").innerText;
|
||||
try, status := driver.executeScript(js)
|
||||
if(status = "Retrieve Draft"){
|
||||
Message = Video was uploaded but Locals saved it as a draft instead of instantly publishing it. Please go to the Locals Page and Retrieve Draft and manually Publish it.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
|
||||
; Get word that's longer than 4 characters in video title
|
||||
VideoTitleArray := StrSplit(VideoTitle, " ")
|
||||
; Iterate from 1 to the end of the array:
|
||||
Loop % VideoTitleArray.Length(){
|
||||
LongestWordInVideoTitle := VideoTitleArray[A_Index]
|
||||
LongestWordInVideoTitle := StrReplace(LongestWordInVideoTitle, "_","-")
|
||||
if(StrLen(LongestWordInVideoTitle) > 4)
|
||||
Break
|
||||
|
||||
; MsgBox % VideoTitleArray[A_Index]
|
||||
|
||||
}
|
||||
|
||||
; DevModeMsgBox(LongestWordInVideoTitle)
|
||||
|
||||
; Message = LongestWordInVideoTitle: %LongestWordInVideoTitle%
|
||||
; SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
; LongestWordInVideoTitle := LongestWordInVideoTitle[1]
|
||||
; Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
||||
|
||||
/* ; Format the post title to remove all spaces and special characters to match with Locals Post
|
||||
ShareLinkFormatted := StrReplace(VideoTitle, " ", "-")
|
||||
ShareLinkFormatted := StrReplace(ShareLinkFormatted, "?", "")
|
||||
ShareLinkFormatted := StrReplace(ShareLinkFormatted, "!", "")
|
||||
ShareLinkFormatted := StrReplace(ShareLinkFormatted, ".", "")
|
||||
ShareLinkFormatted := StrReplace(ShareLinkFormatted, "", "")
|
||||
ShareLinkFormattedFirst5Chars := SubStr(ShareLinkFormatted, 1, 5)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
LocalsBaseURL := StrReplace(LocalsURL, "/share/post", "")
|
||||
; Msgbox % "LocalsPostPageURL: " LocalsPostPageURL
|
||||
; Msgbox % "LocalsURL: " LocalsURL
|
||||
; Msgbox % "LocalsBaseURL: " LocalsBaseURL
|
||||
loop, 5 {
|
||||
ElementIndexNum := A_index - 1
|
||||
DevModeMsgBox(ElementIndexNum)
|
||||
; Msgbox % "ElementIndexNum: " ElementIndexNum
|
||||
|
||||
|
||||
jscheck = return document.getElementsByClassName('post-bottom')[%ElementIndexNum%].outerHTML;
|
||||
try outerHTML := driver.executeScript(jsCheck)
|
||||
|
||||
; Clipboard := outerHTML
|
||||
; DevModeMsgBox(outerHTML)
|
||||
|
||||
; msgbox % "outerHTML: " . outerHTML
|
||||
|
||||
if(InStr(OuterHTML,LongestWordInVideoTitle)){
|
||||
|
||||
Message = %LongestWordInVideoTitle% is in %OuterHTML%
|
||||
; DevModeMsgBox(Message)
|
||||
|
||||
; MsgBox, found match at %A_index%
|
||||
|
||||
|
||||
|
||||
|
||||
ShareLink := StrSplit(OuterHTML, "data-url=")
|
||||
ShareLink := ShareLink[2]
|
||||
; DevModeMsgBox(ShareLink)
|
||||
; Msgbox % "ShareLink: " ShareLink
|
||||
|
||||
URLEndString = ">
|
||||
ShareLink := StrSplit(ShareLink, URLEndString)
|
||||
; ShareLink := ShareLink[1]
|
||||
|
||||
QuotationMark = "
|
||||
ShareLink := StrReplace(ShareLink,QuotationMark, "")
|
||||
|
||||
Break
|
||||
}
|
||||
|
||||
ShareLink :=
|
||||
}
|
||||
|
||||
DevModeMsgBox(ShareLink)
|
||||
|
||||
; ShareLink := "Successful"
|
||||
|
||||
Message = Upload Complete: %ShareLink%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
IniWrite, %ShareLink%, %VideoLinksIniFile%, URLs, LocalsURL
|
||||
AddToTotalVideosUploadedCount()
|
||||
|
||||
SaveDriverURL()
|
||||
|
||||
|
||||
Return
|
||||
|
||||
;
|
||||
;------------------/Locals------------------------------
|
||||
@@ -1,9 +1,19 @@
|
||||
|
||||
; -------------------------------Functions-------------------------------
|
||||
|
||||
OnMsgBoxConfirmChromiumOverwrite() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Cancel
|
||||
ControlSetText Button2, Yes
|
||||
}
|
||||
}
|
||||
|
||||
; https://www.autohotkey.com/docs/v2/Functions.htm#Variadic
|
||||
Join(sep, params*) {
|
||||
For index, param in params
|
||||
str .= param . sep
|
||||
str .= param . sep
|
||||
return SubStr(str, 1, -StrLen(sep))
|
||||
}
|
||||
|
||||
@@ -244,18 +254,54 @@ Check_For_Stuck_Video_Upload(Index_Number, Upload_Status){
|
||||
}
|
||||
} ; end of func
|
||||
|
||||
|
||||
/*
|
||||
*/
|
||||
; Find the longest word in a string of words
|
||||
FindLongestWordInString(m, calloutNumber, pos, haystack, pattern){
|
||||
Global wordLength, longestWord
|
||||
FindLongestWordInString(m, calloutNumber, pos, haystack, pattern){
|
||||
Global wordLength, longestWord
|
||||
|
||||
len := StrLen(m)
|
||||
len := StrLen(m)
|
||||
|
||||
If ( len > wordLength )
|
||||
If ( len > wordLength )
|
||||
{
|
||||
wordLength := len
|
||||
longestWord := m
|
||||
|
||||
; MsgBox, %m%
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
; Split a long string into multiple pieces based on the string lengtht you want and return an array with all strings
|
||||
SplitStringWithSentences(text, maxChunkSize) {
|
||||
sentences := StrSplit(text, "\. ") ; split at period with space after it
|
||||
|
||||
currentChunk := ""
|
||||
chunks := []
|
||||
|
||||
Loop, % sentences.Length()
|
||||
{
|
||||
sentence := sentences[A_Index]
|
||||
CurrentChunkAndSentence := currentChunk . sentence
|
||||
; Msgbox % "CurrentChunkAndSentence: " CurrentChunkAndSentence
|
||||
; msgbox % StrLen(CurrentChunkAndSentence)
|
||||
|
||||
if (StrLen(CurrentChunkAndSentence) <= maxChunkSize)
|
||||
{
|
||||
wordLength := len
|
||||
longestWord := m
|
||||
|
||||
; MsgBox, %m%
|
||||
currentChunk .= sentence . "\. "
|
||||
}
|
||||
else
|
||||
{
|
||||
chunks.Push(currentChunk)
|
||||
currentChunk := sentence . "\. "
|
||||
}
|
||||
}
|
||||
|
||||
if (currentChunk != "")
|
||||
chunks.Push(currentChunk)
|
||||
|
||||
return chunks
|
||||
}
|
||||
|
||||
|
||||
@@ -248,8 +248,12 @@ Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000
|
||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||
|
||||
js = document.getElementById('description').value = "%JSVideoDescription%";
|
||||
try driver.executeScript(js) ;Executes a Javascript on the webpage, mostly used for buttons.
|
||||
try driver.executeScript(js)
|
||||
|
||||
if(VideoSummary){
|
||||
js = document.getElementById('summary').value = "%JSVideoSummary%";
|
||||
try driver.executeScript(js)
|
||||
}
|
||||
|
||||
Message = Inputting Tags
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
@@ -25,13 +25,10 @@ if(SocialMediaDescription = ""){
|
||||
CreateDescriptionForSocialMedia()
|
||||
}
|
||||
|
||||
; Msgbox % "SocialMediaDescription: " SocialMediaDescription
|
||||
|
||||
SubmitDescriptionForDiscordVideosChannel:
|
||||
Message := "**" . VideoTitle . "**" . "`n" . SocialMediaDescription . "`n"
|
||||
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
||||
; Do this with an array!!
|
||||
;
|
||||
|
||||
if(BitChuteURL != "")
|
||||
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
|
||||
@@ -44,23 +41,18 @@ Message .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
Message .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
||||
/*
|
||||
if(OdyseeVideoURL != "")
|
||||
Message .= "[Odysee](<" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
Message .= "[Odysee Audio](<" . OdyseeAudioURL . ") \| "
|
||||
|
||||
*/
|
||||
if(RumbleURL != "")
|
||||
Message .= "[Rumble](<" . RumbleURL . ">) \| "
|
||||
|
||||
/*if(StreamanityURL != "" AND InStr(StreamanityURL, "streamanity.com"))
|
||||
Message .= "[Streamanity](<" . StreamanityURL . ">) \| "
|
||||
|
||||
*/
|
||||
if(DailyMotionURL != "")
|
||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">)"
|
||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
||||
|
||||
if(PodcastTranscriptURL != "")
|
||||
Message .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
||||
|
||||
if(PodcastNumber != "")
|
||||
Message .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||
|
||||
|
||||
UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
||||
|
||||
@@ -56,24 +56,19 @@ VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
VideoLinks .= "[Odysee \(Audio\)](" . OdyseeAudioURL . ") \| "
|
||||
/*
|
||||
if(OdyseeVideoURL != "")
|
||||
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
VideoLinks .= "[Odysee Audio](" . OdyseeAudioURL . ") \| "
|
||||
|
||||
*/
|
||||
if(RumbleURL != "")
|
||||
VideoLinks .= "[Rumble](" . RumbleURL . ") \| "
|
||||
/*
|
||||
if(InStr(StreamanityURL, "https://streamanity.com/video/"))
|
||||
VideoLinks .= "[Streamanity](" . StreamanityURL . ") \| "
|
||||
|
||||
*/
|
||||
if(DailyMotionURL != "")
|
||||
VideoLinks .= "[DailyMotion](" . DailyMotionURL . ") \| "
|
||||
|
||||
if(PodcastTranscriptURL != "")
|
||||
VideoLinks .= "[Video Transcript](" . PodcastTranscriptURL . ") \| "
|
||||
|
||||
if(PodcastNumber != "")
|
||||
VideoLinks .= "[FDRPodcasts](" . "https://fdrpodcasts.com/" . PodcastNumber . ") \| "
|
||||
|
||||
|
||||
TelegramMessage := TelegramVideoTitle . "`n" . TelegramBodymessage . "`n" . VideoLinks
|
||||
|
||||
@@ -83,86 +78,73 @@ StrLenOfMessageAndVideoLinks := StrLen(TelegramVideoTitle) + StrLen(TelegramBody
|
||||
; DevModeMsgBox(StrLenOfMessageAndVideoLinks)
|
||||
|
||||
|
||||
if(StrLenOfMessageAndVideoLinks > 1024){
|
||||
; Telegram SendMessage is limited to 4096 characters
|
||||
if(StrLenOfMessageAndVideoLinks < 4096){ ; split into sendphoto and 1 sendmessage
|
||||
; DevModeMsgBox("Less than 4096 chars")
|
||||
; Photo and Video Title go into SendPhoto
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
; If Length of Title, Video Links and Message is less than 1024 characters:
|
||||
; ------------------------------------------------
|
||||
if(StrLenOfMessageAndVideoLinks < 1024) {
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
||||
if(InStr(Status, "error_code")){
|
||||
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
; Video Description goes into TelegramMessage
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
; SaveOrPostProgress(Message:=Status,PostType:=",ErrorLoggingTextFile")
|
||||
Message = Telegram Error: %Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
} ; split into 2 SendMessages
|
||||
else if (StrLenOfMessageAndVideoLinks > 4096 AND StrLenOfMessageAndVideoLinks < 8192){ ; Split into 2 parts
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
ToolTip
|
||||
Return
|
||||
}
|
||||
}
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 4097, 8192)
|
||||
Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
; If Title, Links and Message are longer than 1024, but less than 4096, split into 2 pieces: sendphoto and sendmessage
|
||||
; ------------------------------------------------
|
||||
if(StrLenOfMessageAndVideoLinks < 4096){
|
||||
|
||||
} ; split into 3 sendMessages
|
||||
else if (StrLenOfMessageAndVideoLinks > 8192 AND StrLenOfMessageAndVideoLinks < 12288){ ; Split into 3 parts
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
; Photo and Video Title go into SendPhoto
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
msgbox % StrLen(TelegramBodymessagePiece)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
; Video Description goes into TelegramMessage
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
|
||||
} else, {
|
||||
; If Title, links and message are longer than 4096 chars, we need to split them into multiple messages
|
||||
; ------------------------------------------------
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
|
||||
; Split the Description into 4096 character chunks while preserving sentences
|
||||
; Used 4095 because a ". " has to be put in at the end of the chunk.
|
||||
VideoDescriptionChunks := SplitStringWithSentences(TelegramBodymessage, 4094)
|
||||
|
||||
|
||||
; go through array and post each chunk as new message
|
||||
Loop % VideoDescriptionChunks.Length(){
|
||||
; ArrayItem := ARRAY[A_Index]
|
||||
Description := VideoDescriptionChunks[A_Index]
|
||||
|
||||
|
||||
SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
||||
; Clipboard := Description
|
||||
; msgbox % Description
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 4097, 8192)
|
||||
msgbox % StrLen(TelegramBodymessagePiece)
|
||||
DevModeMsgBox(TelegramBodymessagePiece)
|
||||
Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
}
|
||||
|
||||
; TelegramBodymessagePiece := SubStr(TelegramBodymessage, 8193, 12288)
|
||||
; Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
}
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||
|
||||
|
||||
} else, { ; if less than 1024 characters, send normally
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
||||
if(InStr(Status, "error_code")){
|
||||
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
; SaveOrPostProgress(Message:=Status,PostType:=",ErrorLoggingTextFile")
|
||||
Message = Telegram Error: %Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
ToolTip
|
||||
Return
|
||||
}
|
||||
|
||||
}
|
||||
; Msgbox % "SizeOfCaption: " SizeOfCaption
|
||||
; SizeOfCaption := SizeOfCaption +
|
||||
; Message .= VideoLinks
|
||||
; msgbox % StrLen(VideoLinks)
|
||||
|
||||
; Message := StrReplace(Message, "`n", LineBreakChar) ; replace all new line characters with the global charater
|
||||
|
||||
; msgbox % StrLen(Message)
|
||||
; sleep, 2000
|
||||
|
||||
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordVideos")
|
||||
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||
|
||||
|
||||
; sleep, 2000
|
||||
|
||||
|
||||
ToolTip
|
||||
CurrentSite :=
|
||||
Return
|
||||
; -------------------------------/Telegram-------------------------------
|
||||
ToolTip
|
||||
CurrentSite :=
|
||||
Return
|
||||
; -------------------------------/Telegram-------------------------------
|
||||
|
||||
18
README.md
18
README.md
@@ -60,15 +60,15 @@ LocalsPostPageURL=
|
||||
- All other settings will automatically get written to the `settings.ini` file as you check/uncheck the setting boxes while running the Poster.
|
||||
|
||||
# Project Files
|
||||
When you start the Uploader, it will ask you to select a project folder that contains the files that will be used for the upload.
|
||||
The program will then loop through that project folder and look for the following files and automatically select them.
|
||||
You can select a different file in the main window if the auto selection does not select the correct file.
|
||||
`title.txt` which should contain the Title of your video/podcast
|
||||
`body.txt` which should contain the body text of your video/podcast
|
||||
`keywords.txt` which contains the tags/keywords that will be used in the video uploads
|
||||
`keywords_podcast.txt` (Optional) which contains the tags/keywords that will be used in the podcast upload. `keywords.txt` will be used for podcast tags if this does not exist.
|
||||
`*.mp4` an mp4 file which is the video file that you are going to upload
|
||||
`*.jpg` or `*.png` file which will be the thumbnail for your video/podcast
|
||||
When you start the Uploader, it will ask you to select a project folder that contains the files that will be used for the upload. <br>
|
||||
The program will then loop through that project folder and look for the following files and automatically select them.<br>
|
||||
You can select a different file in the main window if the auto selection does not select the correct file.<br>
|
||||
`title.txt` which should contain the Title of your video/podcast<br>
|
||||
`body.txt` which should contain the body text of your video/podcast<br>
|
||||
`keywords.txt` which contains the tags/keywords that will be used in the video uploads<br>
|
||||
`keywords_podcast.txt` (Optional) which contains the tags/keywords that will be used in the podcast upload. `keywords.txt` will be used for podcast tags if this does not exist.<br>
|
||||
`*.mp4` an mp4 file which is the video file that you are going to upload<br>
|
||||
`*.jpg` or `*.png` file which will be the thumbnail for your video/podcast<br>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
[Video-Uploader]
|
||||
Version=3.29
|
||||
Version=3.34
|
||||
Name=Freedomain Video Uploader
|
||||
|
||||
Reference in New Issue
Block a user