|
|
|
|
@@ -24,14 +24,15 @@ Menu, Tray, Add, Restart with Last Project, RetryUpload
|
|
|
|
|
Menu, Tray, Default, Restart with Last Project
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
global ScriptName
|
|
|
|
|
|
|
|
|
|
global ScriptNameav
|
|
|
|
|
global ScriptVersion
|
|
|
|
|
global FullScriptName
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ScriptName = Freedomain Video Uploader
|
|
|
|
|
ScriptVersion = 3.21
|
|
|
|
|
ScriptVersion = 3.25
|
|
|
|
|
FullScriptName := ScriptName . " - " . ScriptVersion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -47,6 +48,7 @@ UStartTime := A_TickCount ; start time
|
|
|
|
|
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\RunCMD.ahk
|
|
|
|
|
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\StdOutToVar.ahk
|
|
|
|
|
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk
|
|
|
|
|
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\URLDownloadToVar.ahk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;---ToDo---
|
|
|
|
|
@@ -109,7 +111,7 @@ Number_of_loops_to_Check_Upload_status = 720
|
|
|
|
|
|
|
|
|
|
; number of seconds to wait between loops when checking video upload status
|
|
|
|
|
global Time_Between_Loops_Upload_Status
|
|
|
|
|
Time_Between_Loops_Upload_Status = 5000
|
|
|
|
|
Time_Between_Loops_Upload_Status = 15000 ;
|
|
|
|
|
|
|
|
|
|
; loop Index number to check if video is stuck uploading
|
|
|
|
|
global Array_Index_Num_of_Upload_StatusChecks
|
|
|
|
|
@@ -139,8 +141,8 @@ ScriptSettingsSection := "VideoUploader"
|
|
|
|
|
IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgress, 1
|
|
|
|
|
(ShowTooltipProgress)?(ShowTooltipProgressCheckStatus := 1) : (ShowTooltipProgressCheckStatus := 0)
|
|
|
|
|
|
|
|
|
|
IniRead, XPosition, %SettingsIniFilepath%, General, XPosition
|
|
|
|
|
IniRead, YPosition, %SettingsIniFilepath%, General, YPosition
|
|
|
|
|
IniRead, XPosition, %SettingsIniFilepath%, General, XPosition, 0
|
|
|
|
|
IniRead, YPosition, %SettingsIniFilepath%, General, YPosition, 0
|
|
|
|
|
|
|
|
|
|
IniRead, RootDirToStartIn, %SettingsIniFilepath%, General, RootDirToStartIn
|
|
|
|
|
IniRead, LogErrorsToMsgbox, %SettingsIniFilepath%, General, LogErrorsToMsgbox, %A_Space%
|
|
|
|
|
@@ -313,7 +315,7 @@ if(VideoDescription = ""){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Loop through the folder again to find the correct .WAV audio file as Stef has multiple in there and we need the .mp4 file to be found first so we know what to look for file name wise.
|
|
|
|
|
Loop, files, %VideoFolderDir%\*.WAV, F ; loop through the files in the directory
|
|
|
|
|
Loop, files, %VideoFolderDir%\*.flac, F ; loop through the files in the directory
|
|
|
|
|
{ ; D = Directories, F = Files, R = Recursive
|
|
|
|
|
SplitPath, A_LoopFileFullPath, FileNameWExt, FileDir, FileExt, FileNameNoExt
|
|
|
|
|
|
|
|
|
|
@@ -322,7 +324,21 @@ Loop, files, %VideoFolderDir%\*.WAV, F ; loop through the files in the direct
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Loop through the folder again to find the correct .WAV audio file as Stef has multiple in there and we need the .mp4 file to be found first so we know what to look for file name wise.
|
|
|
|
|
; if no FLAC file, then loop through folder and select WAV file instead
|
|
|
|
|
if(WavAudioFilepath = ""){
|
|
|
|
|
; Loop through the folder again to find the correct .WAV audio file as Stef has multiple in there and we need the .mp4 file to be found first so we know what to look for file name wise.
|
|
|
|
|
Loop, files, %VideoFolderDir%\*.WAV, F ; loop through the files in the directory
|
|
|
|
|
{ ; D = Directories, F = Files, R = Recursive
|
|
|
|
|
SplitPath, A_LoopFileFullPath, FileNameWExt, FileDir, FileExt, FileNameNoExt
|
|
|
|
|
|
|
|
|
|
if(FileNameNoExt = VideoFileNameNoExt){
|
|
|
|
|
WavAudioFilepath := A_LoopFileFullPath
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Find the .mp3 podcast file
|
|
|
|
|
Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the directory
|
|
|
|
|
{ ; D = Directories, F = Files, R = Recursive
|
|
|
|
|
SplitPath, A_LoopFileFullPath, FileNameWExt, FileDir, FileExt, FileNameNoExt
|
|
|
|
|
@@ -556,6 +572,13 @@ else, {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; @ TODO REMOVE
|
|
|
|
|
; LocalsGrabURL := 0
|
|
|
|
|
; Locals := 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; -------------------------------GUI-------------------------------
|
|
|
|
|
|
|
|
|
|
Gui, Font, s%GuiFontSize%
|
|
|
|
|
@@ -633,8 +656,12 @@ Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoThumbFilepath, Select
|
|
|
|
|
Gui, Font, Bold
|
|
|
|
|
if(WavAudioFilepath = "")
|
|
|
|
|
Gui, Add, Text,cRed x%MarginSquared% y+15,WAV Filepath
|
|
|
|
|
else,
|
|
|
|
|
Gui, Add, Text,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
|
|
|
|
|
@@ -738,28 +765,36 @@ Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupB
|
|
|
|
|
; if(VideoFileSizeInMB < 1792)
|
|
|
|
|
; Gui, Add, Checkbox, x+%MarginSpaceDoubled% vFacebook Checked%FacebookCheckStatus%, Facebook
|
|
|
|
|
|
|
|
|
|
Gui, Add, Checkbox, xp+10 yp+25 vBitChute Checked%BitChuteCheckStatus%, BitChute
|
|
|
|
|
Gui, Add, Checkbox, xp+10 yp+25 vBitChute Checked%BitChuteCheckStatus% gUpdateVars, BitChute
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
|
|
|
|
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus%, Locals (Grab URL)
|
|
|
|
|
; msgbox, checking grab url
|
|
|
|
|
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus% gUpdateVars, Locals (Grab URL)
|
|
|
|
|
LocalsGrabURL := 1
|
|
|
|
|
Locals := 0
|
|
|
|
|
}
|
|
|
|
|
else, {
|
|
|
|
|
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocals Checked%LocalsCheckStatus%, Locals
|
|
|
|
|
; 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+%MarginSpaceDoubled% Checked%TelegramCheckStatus%, Telegram
|
|
|
|
|
Gui, Add, Checkbox, vTelegram x+%MarginSpaceTripled% yp+0 Checked%TelegramCheckStatus% gUpdateVars, Telegram (>50 MB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus%, Odysee Video
|
|
|
|
|
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
|
|
|
|
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus%, Odysee Audio
|
|
|
|
|
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%, Rumble
|
|
|
|
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vRumble Checked%RumbleCheckStatus% gUpdateVars, Rumble
|
|
|
|
|
|
|
|
|
|
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus%, Brighteon
|
|
|
|
|
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus%, DailyMotion
|
|
|
|
|
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
|
|
|
|
|
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
|
|
|
|
|
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
|
|
|
|
|
|
|
|
|
|
; Gui, Font, s12
|
|
|
|
|
@@ -911,7 +946,6 @@ SelectVideoThumbFilepath:
|
|
|
|
|
FileSelectFile, VideoThumbFilepath,, %FileDir%, Select Thumbnail File
|
|
|
|
|
|
|
|
|
|
if(!InStr(VideoThumbFilepath, FileDir)){
|
|
|
|
|
; ToolTip, Thumbnail Copied to Project Folder, 850, 0
|
|
|
|
|
TimedToolTip("Thumbnail Copied to Project Folder",,,1000)
|
|
|
|
|
SplitPath, VideoThumbFilepath, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive
|
|
|
|
|
FileCopy, %VideoThumbFilepath%, %FileDir%\*,1
|
|
|
|
|
@@ -933,6 +967,7 @@ Return
|
|
|
|
|
|
|
|
|
|
UpdateChrome:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(CheckForChromeUpdates = "")
|
|
|
|
|
Status := CheckForChromeUpdates(ChromeFilepath)
|
|
|
|
|
|
|
|
|
|
@@ -949,214 +984,212 @@ if(!status){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DownloadLatestChromium()
|
|
|
|
|
Status := DownloadLatestChromium()
|
|
|
|
|
if(Status)
|
|
|
|
|
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Dat
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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(){
|
|
|
|
|
SplitText = Free Documentaries:
|
|
|
|
|
|
|
|
|
|
SocialMediaDescription := StrSplit(VideoDescription, SplitText)
|
|
|
|
|
SocialMediaDescription := SocialMediaDescription[1]
|
|
|
|
|
|
|
|
|
|
if(strlen(SocialMediaDescription) > 1400){
|
|
|
|
|
SocialMediaDescription := SubStr(SocialMediaDescription, 1, 1400)
|
|
|
|
|
SocialMediaDescription .= "..."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
}
|
|
|
|
|
; -------------------------------Upload Video Functionality-------------------------------
|
|
|
|
|
StartScript:
|
|
|
|
|
WinGetPos, XPosition, YPosition, , , A
|
|
|
|
|
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
|
|
|
|
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
|
|
|
|
|
|
|
|
|
Gui, Submit
|
|
|
|
|
Gui, Destroy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Save Testing Mode Info
|
|
|
|
|
;------------------------------------------------
|
|
|
|
|
if(TestingMode){ ; save currently seelcted sites to ini file for next test
|
|
|
|
|
; IniWrite, %Streamanity%, %SettingsIniFilepath%, Testing, Streamanity
|
|
|
|
|
IniWrite, %BitChute%, %SettingsIniFilepath%, Testing, BitChute
|
|
|
|
|
IniWrite, %OdyseeVideo%, %SettingsIniFilepath%, Testing, OdyseeVideo
|
|
|
|
|
IniWrite, %OdyseeVideoThumb%, %SettingsIniFilepath%, Testing, OdyseeVideoThumb
|
|
|
|
|
IniWrite, %OdyseeAudio%, %SettingsIniFilepath%, Testing, OdyseeAudio
|
|
|
|
|
IniWrite, %OdyseeAudioThumb%, %SettingsIniFilepath%, Testing, OdyseeAudioThumb
|
|
|
|
|
IniWrite, %Rumble%, %SettingsIniFilepath%, Testing, Rumble
|
|
|
|
|
IniWrite, %Brighteon%, %SettingsIniFilepath%, Testing, Brighteon
|
|
|
|
|
IniWrite, %DailyMotion%, %SettingsIniFilepath%, Testing, DailyMotion
|
|
|
|
|
IniWrite, %Locals%, %SettingsIniFilepath%, Testing, Locals
|
|
|
|
|
IniWrite, %Telegram%, %SettingsIniFilepath%, Testing, Telegram
|
|
|
|
|
IniWrite, %Facebook%, %SettingsIniFilepath%, Testing, Facebook
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Save Video Info
|
|
|
|
|
;------------------------------------------------
|
|
|
|
|
; if changes made, delete the original file and save the new content to it
|
|
|
|
|
|
|
|
|
|
if(VideoTitle != OriginalVideoTitle){
|
|
|
|
|
VideoTitleFilepath = %VideoFolderDir%\title.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %VideoTitleFilepath%
|
|
|
|
|
FileAppend, %VideoTitle%, %VideoTitleFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(VideoTags != OriginalVideoTags){
|
|
|
|
|
VideoTagsFilepath = %VideoFolderDir%\keywords.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %VideoTagsFilepath%
|
|
|
|
|
FileAppend, %VideoTags%, %VideoTagsFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(PodcastTags != OriginalPodcastTags){
|
|
|
|
|
PodcastTagsFilepath = %VideoFolderDir%\keywords_podcast.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %PodcastTagsFilepath%
|
|
|
|
|
FileAppend, %PodcastTags%, %PodcastTagsFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(VideoDescription != OriginalVideoDescription){
|
|
|
|
|
VideoBodyFilepath = %VideoFolderDir%\body.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %VideoBodyFilepath%
|
|
|
|
|
FileAppend, %VideoDescription%, %VideoBodyFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; -------------------------------/Save Video Info-------------------------------
|
|
|
|
|
|
|
|
|
|
; Save settings to config file
|
|
|
|
|
IniWrite, %ReuseTabs%, %SettingsIniFilepath%, General, ReuseTabs
|
|
|
|
|
IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, General, ShowTooltipProgress
|
|
|
|
|
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, General, AutoUpdateCheck
|
|
|
|
|
IniWrite, %AutoLogin%, %SettingsIniFilepath%, General, AutoLogin
|
|
|
|
|
IniWrite, %PingOnCompletion%, %SettingsIniFilepath%, General, PingOnCompletion
|
|
|
|
|
IniWrite, %KillLBRYAfterUpload%, %SettingsIniFilepath%, General, KillLBRYAfterUpload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(VideoFilepath = ""){
|
|
|
|
|
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
|
|
|
|
run, "%A_ScriptFullPath%" "LastPost"
|
|
|
|
|
ExitApp
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Format the LBRYURLSlug to be API Compatible
|
|
|
|
|
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
|
|
|
|
|
LBRYURLSlug := VideoTitle
|
|
|
|
|
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
|
|
|
|
|
|
|
|
|
; Save the LBRY URL Slug to .ini file in case it's needed later
|
|
|
|
|
IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
|
|
|
|
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
|
|
|
|
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; -------------------------------Log Info To Text-------------------------------
|
|
|
|
|
|
|
|
|
|
(Facebook = 1)?(PostedWebsites .= "Facebook|") : ()
|
|
|
|
|
(Bitchute = 1)?(PostedWebsites .= "Bitchute|") : ()
|
|
|
|
|
(Locals = 1)?(PostedWebsites .= "Locals|") : ()
|
|
|
|
|
(Rumble = 1)?(PostedWebsites .= "Rumble|") : ()
|
|
|
|
|
(Brighteon = 1)?(PostedWebsites .= "Brighteon|") : ()
|
|
|
|
|
; (Streamanity = 1)?(PostedWebsites .= "Streamanity|") : ()
|
|
|
|
|
(Telegram = 1)?(PostedWebsites .= "Telegram|") : ()
|
|
|
|
|
(DailyMotion = 1)?(PostedWebsites .= "DailyMotion|") : ()
|
|
|
|
|
(OdyseeVideo = 1)?(PostedWebsites .= "OdyseeVideo|") : ()
|
|
|
|
|
(OdyseeAudio = 1)?(PostedWebsites .= "OdyseeAudio|") : ()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Log Basic info to the errorlogging file
|
|
|
|
|
Message = %ScriptName% v%ScriptVersion%: Starting Upload `nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
Message := "VideoTitle: " VideoTitle
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoDescription: `n" VideoDescription
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoTags: " VideoTags
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoFilepath: " VideoFilepath
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoThumbFilepath: " VideoThumbFilepath
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
; Convert Video Description into javascript text format for sending to selenium
|
|
|
|
|
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
|
|
|
|
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
|
|
|
|
|
|
|
|
|
; -------------------------------/Log Info To Text-------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Create an array out of the keywords to be used in different places
|
|
|
|
|
VideoTags := StrReplace(VideoTags, ", ",",")
|
|
|
|
|
VideoTags := StrReplace(VideoTags, " ,",",")
|
|
|
|
|
VideoTags := StrReplace(VideoTags, " ",",")
|
|
|
|
|
|
|
|
|
|
KeywordsArray := StrSplit(VideoTags,",")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
if(Facebook)
|
|
|
|
|
gosub, FacebookUpload
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
; 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(){
|
|
|
|
|
SplitText = Free Documentaries:
|
|
|
|
|
|
|
|
|
|
SocialMediaDescription := StrSplit(VideoDescription, SplitText)
|
|
|
|
|
SocialMediaDescription := SocialMediaDescription[1]
|
|
|
|
|
|
|
|
|
|
if(strlen(SocialMediaDescription) > 1400){
|
|
|
|
|
SocialMediaDescription := SubStr(SocialMediaDescription, 1, 1400)
|
|
|
|
|
SocialMediaDescription .= "..."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Return
|
|
|
|
|
}
|
|
|
|
|
; -------------------------------Upload Video Functionality-------------------------------
|
|
|
|
|
StartScript:
|
|
|
|
|
WinGetPos, XPosition, YPosition, , , A
|
|
|
|
|
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
|
|
|
|
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
|
|
|
|
|
|
|
|
|
Gui, Submit
|
|
|
|
|
Gui, Destroy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Save Testing Mode Info
|
|
|
|
|
;------------------------------------------------
|
|
|
|
|
if(TestingMode){ ; save currently seelcted sites to ini file for next test
|
|
|
|
|
; IniWrite, %Streamanity%, %SettingsIniFilepath%, Testing, Streamanity
|
|
|
|
|
IniWrite, %BitChute%, %SettingsIniFilepath%, Testing, BitChute
|
|
|
|
|
IniWrite, %OdyseeVideo%, %SettingsIniFilepath%, Testing, OdyseeVideo
|
|
|
|
|
IniWrite, %OdyseeVideoThumb%, %SettingsIniFilepath%, Testing, OdyseeVideoThumb
|
|
|
|
|
IniWrite, %OdyseeAudio%, %SettingsIniFilepath%, Testing, OdyseeAudio
|
|
|
|
|
IniWrite, %OdyseeAudioThumb%, %SettingsIniFilepath%, Testing, OdyseeAudioThumb
|
|
|
|
|
IniWrite, %Rumble%, %SettingsIniFilepath%, Testing, Rumble
|
|
|
|
|
IniWrite, %Brighteon%, %SettingsIniFilepath%, Testing, Brighteon
|
|
|
|
|
IniWrite, %DailyMotion%, %SettingsIniFilepath%, Testing, DailyMotion
|
|
|
|
|
IniWrite, %Locals%, %SettingsIniFilepath%, Testing, Locals
|
|
|
|
|
IniWrite, %Telegram%, %SettingsIniFilepath%, Testing, Telegram
|
|
|
|
|
IniWrite, %Facebook%, %SettingsIniFilepath%, Testing, Facebook
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Save Video Info
|
|
|
|
|
;------------------------------------------------
|
|
|
|
|
; if changes made, delete the original file and save the new content to it
|
|
|
|
|
|
|
|
|
|
if(VideoTitle != OriginalVideoTitle){
|
|
|
|
|
VideoTitleFilepath = %VideoFolderDir%\title.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %VideoTitleFilepath%
|
|
|
|
|
FileAppend, %VideoTitle%, %VideoTitleFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(VideoTags != OriginalVideoTags){
|
|
|
|
|
VideoTagsFilepath = %VideoFolderDir%\keywords.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %VideoTagsFilepath%
|
|
|
|
|
FileAppend, %VideoTags%, %VideoTagsFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(PodcastTags != OriginalPodcastTags){
|
|
|
|
|
PodcastTagsFilepath = %VideoFolderDir%\keywords_podcast.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %PodcastTagsFilepath%
|
|
|
|
|
FileAppend, %PodcastTags%, %PodcastTagsFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(VideoDescription != OriginalVideoDescription){
|
|
|
|
|
VideoBodyFilepath = %VideoFolderDir%\body.txt
|
|
|
|
|
|
|
|
|
|
FileDelete, %VideoBodyFilepath%
|
|
|
|
|
FileAppend, %VideoDescription%, %VideoBodyFilepath%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; -------------------------------/Save Video Info-------------------------------
|
|
|
|
|
|
|
|
|
|
; Save settings to config file
|
|
|
|
|
IniWrite, %ReuseTabs%, %SettingsIniFilepath%, General, ReuseTabs
|
|
|
|
|
IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, General, ShowTooltipProgress
|
|
|
|
|
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, General, AutoUpdateCheck
|
|
|
|
|
IniWrite, %AutoLogin%, %SettingsIniFilepath%, General, AutoLogin
|
|
|
|
|
IniWrite, %PingOnCompletion%, %SettingsIniFilepath%, General, PingOnCompletion
|
|
|
|
|
IniWrite, %KillLBRYAfterUpload%, %SettingsIniFilepath%, General, KillLBRYAfterUpload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(VideoFilepath = ""){
|
|
|
|
|
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
|
|
|
|
run, "%A_ScriptFullPath%" "LastPost"
|
|
|
|
|
ExitApp
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
; Format the LBRYURLSlug to be API Compatible
|
|
|
|
|
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
|
|
|
|
|
LBRYURLSlug := VideoTitle
|
|
|
|
|
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
|
|
|
|
|
|
|
|
|
; Save the LBRY URL Slug to .ini file in case it's needed later
|
|
|
|
|
IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
|
|
|
|
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
|
|
|
|
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; -------------------------------Log Info To Text-------------------------------
|
|
|
|
|
|
|
|
|
|
(Facebook = 1)?(PostedWebsites .= "Facebook|") : ()
|
|
|
|
|
(Bitchute = 1)?(PostedWebsites .= "Bitchute|") : ()
|
|
|
|
|
(Locals = 1)?(PostedWebsites .= "Locals|") : ()
|
|
|
|
|
(Rumble = 1)?(PostedWebsites .= "Rumble|") : ()
|
|
|
|
|
(Brighteon = 1)?(PostedWebsites .= "Brighteon|") : ()
|
|
|
|
|
; (Streamanity = 1)?(PostedWebsites .= "Streamanity|") : ()
|
|
|
|
|
(Telegram = 1)?(PostedWebsites .= "Telegram|") : ()
|
|
|
|
|
(DailyMotion = 1)?(PostedWebsites .= "DailyMotion|") : ()
|
|
|
|
|
(OdyseeVideo = 1)?(PostedWebsites .= "OdyseeVideo|") : ()
|
|
|
|
|
(OdyseeAudio = 1)?(PostedWebsites .= "OdyseeAudio|") : ()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Log Basic info to the errorlogging file
|
|
|
|
|
Message = %ScriptName% v%ScriptVersion%: Starting Upload `nFor: **%VideoTitle%**`nTo: %PostedWebsites%
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
|
|
|
|
|
|
Message := "VideoTitle: " VideoTitle
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoDescription: `n" VideoDescription
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoTags: " VideoTags
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoFilepath: " VideoFilepath
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "VideoThumbFilepath: " VideoThumbFilepath
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
; -------------------------------/Log Info To Text-------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Create an array out of the keywords to be used in different places
|
|
|
|
|
VideoTags := StrReplace(VideoTags, ", ",",")
|
|
|
|
|
VideoTags := StrReplace(VideoTags, " ,",",")
|
|
|
|
|
VideoTags := StrReplace(VideoTags, " ",",")
|
|
|
|
|
|
|
|
|
|
KeywordsArray := StrSplit(VideoTags,",")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Call each sub one by one, if errors occur then an upload will be stopped and the next upload will then proceed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(Telegram)
|
|
|
|
|
gosub, TelegramVideoUpload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(Locals)
|
|
|
|
|
gosub, LocalsUpload
|
|
|
|
|
|
|
|
|
|
@@ -1198,7 +1231,7 @@ if(OdyseeAudio){
|
|
|
|
|
Gosub, LBRYGetURL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(LocalsGrabURL OR LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
|
|
|
|
if(LocalsGrabURL){
|
|
|
|
|
Gosub, LocalsGrabURL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1228,6 +1261,25 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
@@ -1359,6 +1411,10 @@ 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
|
|
|
|
|
|
|
|
|
|
SaveCurrentChromeVersionToIniFile()
|
|
|
|
|
@@ -1629,11 +1685,11 @@ Return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OnMsgBoxConfirmChromiumOverwrite() {
|
|
|
|
|
DetectHiddenWindows, On
|
|
|
|
|
Process, Exist
|
|
|
|
|
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
|
|
|
|
ControlSetText Button1, Cancel
|
|
|
|
|
ControlSetText Button2, Yes
|
|
|
|
|
}
|
|
|
|
|
OnMsgBoxConfirmChromiumOverwrite() {
|
|
|
|
|
DetectHiddenWindows, On
|
|
|
|
|
Process, Exist
|
|
|
|
|
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
|
|
|
|
ControlSetText Button1, Cancel
|
|
|
|
|
ControlSetText Button2, Yes
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|