Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b98ae5e190 | |||
| ba0bf308b4 | |||
| 58d80bd084 | |||
| 8b1a8d407c | |||
| b59bfbe2cf | |||
| c4b2eeea8e | |||
| 723dec3fac | |||
| c60a45445c | |||
| fa43716ebe | |||
| ef3cb41e9c | |||
| 777cfaa242 | |||
| dd7c85e22e | |||
| ca0b6ce1b7 | |||
| a576a194c1 | |||
| 9cbe1410e5 | |||
| f339ede04c | |||
| 4f4361276f |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -19,3 +19,7 @@ Freedomain Video Uploader.exe
|
||||
Lib/LBRY Process Killer.exe
|
||||
Lib/chrome-win64
|
||||
Lib/Version.ini
|
||||
Lib/Version-FVU.ini
|
||||
Lib/Version-FPS.ini
|
||||
**/Scheduled-Posts
|
||||
Freedomain Post Scheduler.exe
|
||||
|
||||
@@ -6,6 +6,7 @@ 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
|
||||
DetectHiddenWindows, ON ; used for finding Running .ahk scripts
|
||||
|
||||
; Only Set tool tray icon if this is the source .ahk script.
|
||||
; The .exe has the icon compiled into it
|
||||
@@ -15,7 +16,13 @@ if(InStr(A_ScriptFullPath, ".ahk")){
|
||||
|
||||
; Parameter passed in to script
|
||||
; ------------------------------------------------
|
||||
PassedParameter = %1%
|
||||
PassedInArgument1_Filepath = %1% ; Filepath of one of the files in the directory of the video project
|
||||
PassedInArgument2_Action = %2% ; "Scheduled", "ShowResults", "Delete"
|
||||
PassedInArgument3_Details = %3% ; Details of Argument2, eg list of Sites to Upload to
|
||||
|
||||
; Msgbox % "PassedInArgument1_Filepath: " PassedInArgument1_Filepath
|
||||
; Msgbox % "PassedInArgument2: " PassedInArgument2
|
||||
; Msgbox % "PassedInArgument3: " PassedInArgument3
|
||||
|
||||
|
||||
; Customize the Toolbar Icon Menu
|
||||
@@ -46,13 +53,13 @@ UStartTime := A_TickCount ; start time
|
||||
#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
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Miscellaneous-Functions.ahk ; Misc functions for video uploading specifically
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\LBRY-Functions.ahk ; LBRY Specific Functions
|
||||
|
||||
|
||||
;---Global Variables---
|
||||
;------------------------------------------------
|
||||
global ScriptNameav
|
||||
global ScriptVersion
|
||||
global FullScriptName
|
||||
|
||||
global LBRYResolveAPICommand
|
||||
global LBRYPermanentURL
|
||||
global VideoTitle
|
||||
@@ -70,7 +77,6 @@ global CurrentSite
|
||||
global Driver
|
||||
global DriverStatus
|
||||
global ChromeProfile
|
||||
global ShowTooltipProgressCheckStatus
|
||||
global ShowTooltipProgress
|
||||
global ErrorLogSummary
|
||||
global DiscordParlerWebhookURL
|
||||
@@ -80,7 +86,6 @@ global ErrorLoggingFilePath
|
||||
global ErrorLogVar
|
||||
ErrorLogVar :=
|
||||
|
||||
global ReuseTabs ; reuse tabs variable
|
||||
global DevMode
|
||||
|
||||
global LBRYNetFilepath
|
||||
@@ -112,20 +117,25 @@ SettingsIniFilepath := A_ScriptDir . "\Settings.ini"
|
||||
global ScriptSettingsSection
|
||||
ScriptSettingsSection := "VideoUploader"
|
||||
|
||||
global ScriptNameAcronym
|
||||
ScriptNameAcronym := "FVU"
|
||||
|
||||
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"
|
||||
global ScriptName
|
||||
global ScriptVersion
|
||||
global FullScriptName
|
||||
|
||||
VersionIniFilepath = %A_ScriptDir%\Lib\Version-%ScriptNameAcronym%.ini
|
||||
|
||||
; Install the Version.ini file in lib folder (Used by .exe file)
|
||||
FileInstall, Version.ini, %VersionIniFilepath%, 1
|
||||
IniRead, ScriptVersion, %VersionIniFilepath%,Video-Uploader, Version, 0.0
|
||||
IniRead, ScriptName, %VersionIniFilepath%,Video-Uploader, Name,
|
||||
FullScriptName := ScriptName . " - " . ScriptVersion
|
||||
|
||||
|
||||
;---Script Settings---
|
||||
;------------------------------------------------
|
||||
; Checkbox Settings
|
||||
IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgress, 1
|
||||
(ShowTooltipProgress)?(ShowTooltipProgressCheckStatus := 1) : (ShowTooltipProgressCheckStatus := 0)
|
||||
|
||||
IniRead, XPosition, %SettingsIniFilepath%, General, XPosition, 0
|
||||
IniRead, YPosition, %SettingsIniFilepath%, General, YPosition, 0
|
||||
|
||||
@@ -136,23 +146,26 @@ IniRead, DevMode, %SettingsIniFilepath%, General, DevMode, 0
|
||||
IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, 0
|
||||
IniRead, MouseClicksSaved, %SettingsIniFilepath%, General, MouseClicksSaved, 0
|
||||
|
||||
; Checkbox Settings
|
||||
IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgress, 1
|
||||
(ShowTooltipProgress)?(ShowTooltipProgressCheckStatus := 1) : (ShowTooltipProgressCheckStatus := 0)
|
||||
|
||||
ReuseTabs := 1 ; ReuseTabs is permanantly on. There is never a time where you want to create new tabs for every website
|
||||
|
||||
IniRead, AutoUpdateCheck, %SettingsIniFilepath%, General, AutoUpdateCheck, 1
|
||||
(AutoUpdateCheck)?(AutoUpdateCheckCheckStatus := 1) : (AutoUpdateCheckCheckStatus := 0)
|
||||
|
||||
; AutoLogin setting
|
||||
IniRead, AutoLogin, %SettingsIniFilepath%, General, AutoLogin, 1
|
||||
(AutoUpdateCheck)?(AutoUpdateCheckCheckStatus := 1) : (AutoUpdateCheckCheckStatus := 0)
|
||||
|
||||
IniRead, PingOnCompletion, %SettingsIniFilepath%, General, PingOnCompletion, 1
|
||||
(PingOnCompletion)?(PingOnCompletionCheckStatus := 1) : (PingOnCompletionCheckStatus := 0)
|
||||
IniRead, KillLBRYAfterUpload, %SettingsIniFilepath%, General, KillLBRYAfterUpload, 1
|
||||
|
||||
if(PingOnCompletion){
|
||||
IniRead, ConfirmBeforeSubmit, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit, 0
|
||||
|
||||
|
||||
; Discord Error Logging
|
||||
; ------------------------------------------------
|
||||
IniRead, ErrorLogToDiscord, %SettingsIniFilepath%, %ScriptSettingsSection%, ErrorLogToDiscord, 1
|
||||
IniRead, DiscordPingOnCompletion, %SettingsIniFilepath%, %ScriptSettingsSection%, DiscordPingOnCompletion, 1
|
||||
|
||||
|
||||
|
||||
if(ErrorLogToDiscord || DiscordPingOnCompletion){
|
||||
IniRead, DiscordUsernameID, %SettingsIniFilepath%, General, DiscordUsernameID, %A_space%
|
||||
if(!DiscordUsernameID){
|
||||
Message = DiscordUsernameID is blank. Will not be able to ping to notify when uploads are complete.`nPlease add user ID in settings.ini under: `n`n[General]`nDiscordUsernameID=`nOr Uncheck "Discord Ping on Completion"
|
||||
@@ -161,10 +174,6 @@ if(PingOnCompletion){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IniRead, KillLBRYAfterUpload, %SettingsIniFilepath%, General, KillLBRYAfterUpload, 1
|
||||
(KillLBRYAfterUpload)?(=KillLBRYAfterUploadCheckStatus := 1) : (KillLBRYAfterUploadCheckStatus := 0)
|
||||
|
||||
IniRead, DiscordErrorLoggingWebhookBotURL, %SettingsIniFilepath%, General, DiscordWebhookBotURL, %A_space%
|
||||
if(DiscordErrorLoggingWebhookBotURL = ""){
|
||||
Message = DiscordErrorLoggingWebhookBotURL is blank. `nWill not be able to post error messages or upload status to discord.`nPlease add discord webhook URL in settings.ini under: `n`n[General]`DiscordErrorLoggingWebhookBotURL=
|
||||
@@ -172,20 +181,26 @@ if(DiscordErrorLoggingWebhookBotURL = ""){
|
||||
}
|
||||
|
||||
|
||||
|
||||
;---Auto Updater Settings---
|
||||
;------------------------------------------------
|
||||
; Auto Updater Settings
|
||||
; ------------------------------------------------
|
||||
global GitReleasesAPIURL
|
||||
GitReleasesAPIURL = https://freedomain.dev/api/v1/repos/yuriy/Freedomain-Video-Uploader/releases
|
||||
GitReleasesAPIURL = https://freedomain.dev/api/v1/repos/yuriy/video-uploader/releases
|
||||
|
||||
; Post Scheduler Settings
|
||||
; ------------------------------------------------
|
||||
global PostSchedulerGitReleasesAPIURL
|
||||
PostSchedulerGitReleasesAPIURL = https://freedomain.dev/api/v1/repos/yuriy/post-scheduler/releases
|
||||
IniRead, PostSchedulerVersion, %SettingsIniFilepath%, Freedomain Post Scheduler, Version, 0.0
|
||||
IniRead, PostSchedulerFilepath, %SettingsIniFilepath%, Filepaths, PostScheduler, %A_Space%
|
||||
|
||||
|
||||
; Msgbox % "PostSchedulerVersion: " PostSchedulerVersion
|
||||
; IniRead, OutputVar, Filename, Section, Key [, Default]
|
||||
|
||||
|
||||
;---LBRY Settings---
|
||||
;------------------------------------------------
|
||||
IniRead, LBRYNewVideoStakeAmount, %SettingsIniFilepath%, General, LBRYNewVideoStakeAmount, %A_Space%
|
||||
if(LBRYNewVideoStakeAmount = ""){
|
||||
LBRYNewVideoStakeAmount = 1.0
|
||||
IniWrite, %LBRYNewVideoStakeAmount%, %SettingsIniFilepath%, General, LBRYNewVideoStakeAmount
|
||||
}
|
||||
IniRead, LBRYNewVideoStakeAmount, %SettingsIniFilepath%, General, LBRYNewVideoStakeAmount, 1.0
|
||||
|
||||
IniRead, LBRYChannelID, %SettingsIniFilepath%, General, LBRYChannelID, %A_Space%
|
||||
if(LBRYChannelID = ""){
|
||||
@@ -194,12 +209,10 @@ if(LBRYChannelID = ""){
|
||||
}
|
||||
|
||||
|
||||
|
||||
;---Read Info From Project Files---
|
||||
;------------------------------------------------
|
||||
|
||||
; if passed argument is .exe file, then script has just been udpated and we need to move the old version
|
||||
if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){
|
||||
; Set Settings based on Passed in Arguments
|
||||
; ------------------------------------------------
|
||||
; if passed argument is .exe file, then script has just been updated and we need to move the old version
|
||||
if(InStr(PassedInArgument1_Filepath,ScriptName) and InStr(PassedInArgument1_Filepath,".exe")){
|
||||
|
||||
; create backups folder if it doesn't exist
|
||||
BackupsFolder = %LibFolder%\Backups\
|
||||
@@ -210,44 +223,51 @@ if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){
|
||||
}
|
||||
|
||||
; move old version to backups folder, overwrite if name conflict
|
||||
FileMove, %PassedParameter%, %BackupsFolder%\*, 1
|
||||
FileDelete, %PassedInArgument1_Filepath%
|
||||
if(ErrorLevel){ ; most likely because the old version hasn't finished exiting yet
|
||||
SaveOrPostProgress(Message:="Moving Old Version to Backups",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar")
|
||||
sleep, 2000
|
||||
FileMove, %PassedParameter%, %BackupsFolder%\*, 1
|
||||
FileDelete, %PassedInArgument1_Filepath%
|
||||
if(ErrorLevel){
|
||||
MsgBox,,Update Successful, Update was successful`, but unable to move old version to the Backups folder.`nPlease move it or delete it manually.
|
||||
MsgBox,,Update Successful, Update was successful`, but failed to delete the old version, most likely due to it running.`nPlease delete it manually.
|
||||
}
|
||||
ToolTip
|
||||
}
|
||||
; Change paramter to LastPost so last post gets automatically opened instead of user having to re-select the file again
|
||||
PassedParameter = LastPost
|
||||
; Change parameter to "LastPost" so last post now gets automatically opened instead of user having to re-select the file again
|
||||
PassedInArgument1_Filepath = LastPost
|
||||
}
|
||||
|
||||
if(PassedParameter = "LastPost"){
|
||||
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
||||
if(PassedInArgument1_Filepath = "LastPost"){
|
||||
IniRead, PassedInArgument1_Filepath, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
||||
}
|
||||
|
||||
if(PassedParameter = "ShowResults"){
|
||||
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
||||
if(PassedInArgument2_Action = "ShowResults"){
|
||||
IniRead, PassedInArgument1_Filepath, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
||||
}
|
||||
|
||||
|
||||
|
||||
PassedParameterLength := StrLen(PassedParameter)
|
||||
if(PassedParameterLength < 5 and !InStr(PassedParameter, ".exe")){
|
||||
; Show File Selection Dialogue
|
||||
; ------------------------------------------------
|
||||
PassedInArgument1_FilepathLength := StrLen(PassedInArgument1_Filepath)
|
||||
if(PassedInArgument1_FilepathLength < 5 and !InStr(PassedInArgument1_Filepath, ".exe")){
|
||||
FileSelectFile, BodyTextFilePath,,%RootDirToStartIn%,Please Select ANY File Within the Project Folder
|
||||
if(ErrorLevel)
|
||||
Return
|
||||
}
|
||||
else, {
|
||||
SkipUpdateCheckThisRun := 1
|
||||
BodyTextFilePath := PassedParameter
|
||||
BodyTextFilePath := PassedInArgument1_Filepath
|
||||
}
|
||||
|
||||
|
||||
; @todo Do this with an array. Add all filepaths to array and then pull out the ones with the extension.
|
||||
; get directory from the filepath grabbed
|
||||
|
||||
|
||||
|
||||
|
||||
; Read Info From Project Files
|
||||
;------------------------------------------------
|
||||
; get project directory from the "BodyTextFilePath"
|
||||
; BodyTextFilePath will be any file from within the update directory
|
||||
SplitPath, BodyTextFilePath, OutFileName, VideoFolderDir, OutExtension, OutNameNoExt, OutDrive
|
||||
|
||||
Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the directory
|
||||
@@ -267,11 +287,17 @@ 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%
|
||||
OriginalVideoTags := VideoTags
|
||||
OriginalPodcastTags := PodcastTags
|
||||
OriginalPodcastTags := PodcastTags ; set in case there is no keywords_podcast file
|
||||
}
|
||||
|
||||
if(FileNameWExt = "keywords_podcast.txt"){
|
||||
@@ -290,16 +316,11 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
if(VideoDescription = ""){
|
||||
; @todo: is this used anymore?
|
||||
FileRead, VideoDescription, %A_scriptDir%\Lib\DescriptionTemplate.txt
|
||||
}
|
||||
|
||||
; 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%\*.flac, F ; loop through the files in the directory
|
||||
{ ; D = Directories, F = Files, R = Recursive
|
||||
@@ -335,15 +356,13 @@ Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the direct
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
;---Read Info From Previous Run And Set Upload Options---
|
||||
;--------------------------------------------------------
|
||||
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 = ""){
|
||||
@@ -371,7 +390,9 @@ 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%
|
||||
IniRead, UnauthorizedTVURL, %VideoLinksIniFile%, URLs, UnauthorizedTVURL, %A_Space%
|
||||
|
||||
|
||||
; MISC
|
||||
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
||||
@@ -388,13 +409,12 @@ if(FileExist(VideoLinksIniFile)){
|
||||
|
||||
; Create a directory for errorlogging if this is the first time working on this project
|
||||
if(ErrorLoggingFilePath = ""){
|
||||
; DevModeMsgBox("generating filepath")
|
||||
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
||||
ErrorLoggingDirectory := ErrorLoggingFolder . "\" . TodayDate . "_FVU"
|
||||
ErrorLoggingDirectory := ErrorLoggingFolder . "\" . TodayDate . "_" . ScriptNameAcronym
|
||||
FileCreateDir, %ErrorLoggingDirectory%
|
||||
ErrorLoggingFilePath := ErrorLoggingFolder . "\" . TodayDate . "_FVU\ErrorLogging.txt" ; Set locaiton where error logging text will go
|
||||
ErrorLoggingFilePath := ErrorLoggingFolder . "\" . TodayDate . "_" . ScriptNameAcronym . "\ErrorLogging.txt" ; Set locaiton where error logging text will go
|
||||
|
||||
; Write both filepaths to .ini file
|
||||
; Save ErrorLoggingFilePath to project settings file so it can be reused if doing multiple runs
|
||||
IniWrite, %ErrorLoggingFilePath%, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath
|
||||
}
|
||||
|
||||
@@ -403,177 +423,147 @@ if(PodcastNumber = ""){
|
||||
PodcastNumber := PodcastNumber[2]
|
||||
}
|
||||
|
||||
; Set Websites to Upload to
|
||||
; ------------------------------------------------
|
||||
; Set the checkmark status of each item based on the variable status
|
||||
; (StreamanityURL != "")?(StreamanityCheckStatus := 0) : (StreamanityCheckStatus := 1)
|
||||
(BitChuteURL != "")?(BitChuteCheckStatus := 0) : (BitChuteCheckStatus := 1)
|
||||
(BitChuteURL)?(BitChute := 0) : (BitChute := 1)
|
||||
(RumbleURL)?(Rumble := 0) : (Rumble := 1)
|
||||
(DailyMotionURL)?(DailyMotion := 0) : (DailyMotion := 1)
|
||||
|
||||
(OdyseeVideoURL != "")?(OdyseeVideoCheckStatus := 0) : (OdyseeVideoCheckStatus := 1)
|
||||
(OdyseeVideoThumb != "")?(OdyseeVideoThumbCheckStatus := 0) : (OdyseeVideoThumbCheckStatus := 0)
|
||||
OdyseeAudioThumbCheckStatus := 0
|
||||
if(OdyseeAudioURL OR WavAudioFilepath = "")
|
||||
OdyseeAudioCheckStatus := 0
|
||||
/*
|
||||
if(OdyseeAudioThumb OR WavAudioFilepath = "")
|
||||
OdyseeAudioThumbCheckStatus := 0
|
||||
; if user tried to upload to locals already and still needs to grab the url
|
||||
if(LocalsURL = "" OR LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
||||
Locals := 1
|
||||
}
|
||||
else,
|
||||
Locals := 0
|
||||
|
||||
*/
|
||||
(RumbleURL != "")?(RumbleCheckStatus := 0) : (RumbleCheckStatus := 1)
|
||||
; if user tried to upload to locals already and still needs to grab the url, check
|
||||
(LocalsURL = "LocalsUploadStartedNeedToGrabURL")?(LocalsCheckStatus := 1) : (LocalsCheckStatus := 0)
|
||||
(BrighteonURL != "")?(BrighteonCheckStatus := 0) : (BrighteonCheckStatus := 1)
|
||||
(OdyseeVideoURL)?(OdyseeVideo := 0) : (OdyseeVideo := 1)
|
||||
(OdyseeAudioURL || WavAudioFilepath = "")?(OdyseeAudio := 0) : (OdyseeAudio := 1)
|
||||
|
||||
; Brighteon has 6GB video file size limit
|
||||
(BrighteonURL)?(Brighteon := 0) : (Brighteon := 1)
|
||||
if(VideoFileSizeInMB > 6144){
|
||||
VideoFileSizeOver6GB := 1
|
||||
BrighteonCheckStatus := 0
|
||||
}
|
||||
|
||||
(DailyMotionURL != "")?(DailyMotionCheckStatus := 0) : (DailyMotionCheckStatus := 1)
|
||||
FacebookCheckStatus := 0
|
||||
TelegramCheckStatus := 0
|
||||
|
||||
;---/Read Info From Previous Run And Set Upload Options---
|
||||
;--------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
;---Testing Mode Overrides---
|
||||
;------------------------------------------------
|
||||
IniRead, TestingMode, %SettingsIniFilepath%, General, TestingMode, 0
|
||||
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%
|
||||
(BitChute)?(BitChuteCheckStatus := 1) : (BitChuteCheckStatus := 0)
|
||||
|
||||
IniRead, OdyseeVideo, %SettingsIniFilepath%, Testing, OdyseeVideo, %A_Space%
|
||||
(OdyseeVideo)?(OdyseeVideoCheckStatus := 1) : (OdyseeVideoCheckStatus := 0)
|
||||
|
||||
IniRead, OdyseeVideoThumb, %SettingsIniFilepath%, Testing, OdyseeVideoThumb, %A_Space%
|
||||
(OdyseeVideoThumb)?(OdyseeVideoThumbCheckStatus := 1) : (OdyseeVideoThumbCheckStatus := 0)
|
||||
|
||||
IniRead, OdyseeAudio, %SettingsIniFilepath%, Testing, OdyseeAudio, %A_Space%
|
||||
(OdyseeAudio)?(OdyseeAudioCheckStatus := 1) : (OdyseeAudioCheckStatus := 0)
|
||||
|
||||
IniRead, OdyseeAudioThumb, %SettingsIniFilepath%, Testing, OdyseeAudioThumb, %A_Space%
|
||||
(OdyseeAudioThumb)?(OdyseeAudioThumbCheckStatus := 1) : (OdyseeAudioThumbCheckStatus := 0)
|
||||
|
||||
IniRead, Rumble, %SettingsIniFilepath%, Testing, Rumble, %A_Space%
|
||||
(Rumble)?(RumbleCheckStatus := 1) : (RumbleCheckStatus := 0)
|
||||
|
||||
IniRead, Brighteon, %SettingsIniFilepath%, Testing, Brighteon, %A_Space%
|
||||
(Brighteon)?(BrighteonCheckStatus := 1) : (BrighteonCheckStatus := 0)
|
||||
|
||||
IniRead, DailyMotion, %SettingsIniFilepath%, Testing, DailyMotion, %A_Space%
|
||||
(DailyMotion)?(DailyMotionCheckStatus := 1) : (DailyMotionCheckStatus := 0)
|
||||
|
||||
IniRead, Locals, %SettingsIniFilepath%, Testing, Locals, %A_Space%
|
||||
(Locals)?(LocalsCheckStatus := 1) : (LocalsCheckStatus := 0)
|
||||
|
||||
IniRead, Telegram, %SettingsIniFilepath%, Testing, Telegram, %A_Space%
|
||||
(Telegram)?(TelegramCheckStatus := 1) : (TelegramCheckStatus := 0)
|
||||
|
||||
IniRead, Facebook, %SettingsIniFilepath%, Testing, Facebook, %A_Space%
|
||||
(Facebook)?(FacebookCheckStatus := 1) : (FacebookCheckStatus := 0)
|
||||
Brighteon := 0
|
||||
}
|
||||
|
||||
|
||||
if(PassedParameter = "ShowResults"){
|
||||
goto, DisplayResults
|
||||
}
|
||||
|
||||
|
||||
; Main GUI Window
|
||||
; Override Website statuses if this is a schedule post based on Argument3
|
||||
; ------------------------------------------------
|
||||
#include %A_scriptDir%\Modules\GUI-Main-Window.ahk
|
||||
if(PassedInArgument2_Action = "Scheduled"){
|
||||
; if(PassedInArgument3_Details){
|
||||
|
||||
(InStr(PassedInArgument3_Details, "Locals"))?(Locals := 1) : (Locals := 0)
|
||||
(InStr(PassedInArgument3_Details, "Bitchute"))?(Bitchute := 1) : (Bitchute := 0)
|
||||
(InStr(PassedInArgument3_Details, "OdyseeVideo"))?(OdyseeVideo := 1) : (OdyseeVideo := 0)
|
||||
(InStr(PassedInArgument3_Details, "OdyseeAudio"))?(OdyseeAudio := 1) : (OdyseeAudio := 0)
|
||||
(InStr(PassedInArgument3_Details, "Rumble"))?(Rumble := 1) : (Rumble := 0)
|
||||
(InStr(PassedInArgument3_Details, "Brighteon"))?(Brighteon := 1) : (Brighteon := 0)
|
||||
(InStr(PassedInArgument3_Details, "DailyMotion"))?(DailyMotion := 1) : (DailyMotion := 0)
|
||||
|
||||
; Write current project to ini file for easy reloading
|
||||
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
||||
|
||||
|
||||
URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
;---Check for Updates---
|
||||
;------------------------------------------------
|
||||
if(AutoUpdateCheck AND !UpdateAvailable){
|
||||
Message = Checking for Updates
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
if(CheckForUpdates(GitReleasesAPIURL))
|
||||
GuiControl,,UpdateAvailable, Uploader Update Available!
|
||||
|
||||
if(CheckForChromeUpdates(ChromeFilepath)){
|
||||
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
|
||||
ChromeUpdateAvailable := 1
|
||||
|
||||
; }
|
||||
goto, StartScheduledPost
|
||||
}
|
||||
}
|
||||
|
||||
; calculate run time and convert to seconds
|
||||
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
Return
|
||||
;---/Read Info From Previous Run And Set Upload Options---
|
||||
;--------------------------------------------------------
|
||||
|
||||
; -------------------------------GUI GoSubs-------------------------------
|
||||
; Kill the script if user clicks on cancel button
|
||||
KillScript:
|
||||
; GuiClose:
|
||||
ExitApp
|
||||
Return
|
||||
|
||||
PauseScript:
|
||||
Pause,Toggle
|
||||
Return
|
||||
|
||||
CancelPost:
|
||||
GuiClose:
|
||||
; ExitApp
|
||||
Gui, Submit,
|
||||
Return
|
||||
|
||||
ReloadScript:
|
||||
Reload
|
||||
Return
|
||||
|
||||
; Gets activated each time that text gets input into any of the text boxes
|
||||
; updates the variables with the new text
|
||||
UpdateVars:
|
||||
Gui, Submit, NoHide
|
||||
Return
|
||||
|
||||
SubmitDescription:
|
||||
Gui, Submit, NoHide
|
||||
DescriptionCharCount := StrLen(VideoDescription)
|
||||
GuiControl,, DescriptionCharCount, %DescriptionCharCount%
|
||||
Return
|
||||
if(PassedInArgument2_Action = "ShowResults"){
|
||||
goto, DisplayResults
|
||||
}
|
||||
|
||||
|
||||
|
||||
; Open folder of the project
|
||||
OpenProjectFolder:
|
||||
run, %VideoFolderDir%
|
||||
Return
|
||||
; Main GUI Window
|
||||
; ------------------------------------------------
|
||||
gosub, SetAndShowMainGUI
|
||||
|
||||
ClearVideoLinks:
|
||||
FileDelete, %VideoLinksIniFile%
|
||||
|
||||
; Write current project to ini file for easy reloading
|
||||
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
||||
|
||||
|
||||
RunTimeToShowGui := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
Return
|
||||
|
||||
; -------------------------------GUI GoSubs-------------------------------
|
||||
; Kill the script if user clicks on cancel button
|
||||
KillScript:
|
||||
; GuiClose:
|
||||
ExitApp
|
||||
Return
|
||||
|
||||
PauseScript:
|
||||
Pause,Toggle
|
||||
Return
|
||||
|
||||
CancelPost:
|
||||
GuiClose:
|
||||
; ExitApp
|
||||
Gui, Submit,
|
||||
Return
|
||||
|
||||
ReloadScript:
|
||||
Reload
|
||||
Return
|
||||
|
||||
; Gets activated each time that text gets input into any of the text boxes
|
||||
; updates the variables with the new text
|
||||
UpdateVars:
|
||||
Gui, Submit, NoHide
|
||||
Return
|
||||
|
||||
SubmitDescription:
|
||||
Gui, Submit, NoHide
|
||||
DescriptionCharCount := StrLen(VideoDescription)
|
||||
GuiControl,, DescriptionCharCount, %DescriptionCharCount%
|
||||
Return
|
||||
|
||||
|
||||
|
||||
; Open folder of the project
|
||||
OpenProjectFolder:
|
||||
run, %VideoFolderDir%
|
||||
Return
|
||||
|
||||
ClearVideoLinks:
|
||||
FileDelete, %VideoLinksIniFile%
|
||||
Return
|
||||
|
||||
|
||||
|
||||
ToggleTestingMode:
|
||||
ToggleTestingMode()
|
||||
run, "%A_ScriptFullPath%" "LastPost"
|
||||
Return
|
||||
|
||||
ToggleDevMode:
|
||||
ToggleDevMode()
|
||||
run, "%A_ScriptFullPath%" "LastPost"
|
||||
Return
|
||||
|
||||
/*
|
||||
OpenGiteaPage:
|
||||
run, https://freedomain.dev/yuriy/video-uploader
|
||||
Return
|
||||
|
||||
OpenErrorLog:
|
||||
run, %ErrorLoggingFilePath%
|
||||
Return
|
||||
|
||||
ToggleTestingMode:
|
||||
ToggleTestingMode()
|
||||
run, "%A_ScriptFullPath%" "LastPost"
|
||||
Return
|
||||
*/
|
||||
|
||||
ToggleDevMode:
|
||||
ToggleDevMode()
|
||||
run, "%A_ScriptFullPath%" "LastPost"
|
||||
Return
|
||||
UncheckAllPlatforms:
|
||||
GuiControl,,Bitchute, 0
|
||||
GuiControl,,Locals, 0
|
||||
GuiControl,,OdyseeVideo, 0
|
||||
GuiControl,,OdyseeAudio, 0
|
||||
GuiControl,,Rumble, 0
|
||||
GuiControl,,DailyMotion, 0
|
||||
GuiControl,,Brighteon, 0
|
||||
|
||||
|
||||
OpenGiteaPage:
|
||||
run, https://freedomain.dev/yuriy/video-uploader
|
||||
Return
|
||||
|
||||
|
||||
@@ -624,36 +614,10 @@ UpdateScript()
|
||||
; @todo: Save any changes made to the script before installing update
|
||||
Return
|
||||
|
||||
UpdateChrome:
|
||||
|
||||
|
||||
if(CheckForChromeUpdates = "")
|
||||
Status := CheckForChromeUpdates(ChromeFilepath)
|
||||
|
||||
if(!status){
|
||||
OnMessage(0x44, "OnMsgBoxConfirmChromiumOverwrite")
|
||||
MsgBox 0x41, Already Up-to-Date, Yor current Chromium version is already up to date. `nDo you want to download and overwrite it?
|
||||
OnMessage(0x44, "")
|
||||
|
||||
IfMsgBox OK, {
|
||||
Return
|
||||
} Else IfMsgBox Cancel, {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Status := DownloadLatestChromium()
|
||||
if(Status)
|
||||
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Dat
|
||||
|
||||
|
||||
Return
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
CreateDescriptionForSocialMedia(){
|
||||
SplitText = Free Documentaries:
|
||||
|
||||
@@ -673,29 +637,16 @@ WinGetPos, XPosition, YPosition, , , A
|
||||
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
||||
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
||||
|
||||
Gui, Submit
|
||||
Gui, Destroy
|
||||
Gui, Submit, NoHide
|
||||
|
||||
|
||||
|
||||
|
||||
; 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
|
||||
if(VideoFilepath = ""){
|
||||
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
||||
Return
|
||||
}
|
||||
|
||||
; Destroy GUI after checking everything is working
|
||||
Gui, Destroy
|
||||
|
||||
; Save Video Info
|
||||
;------------------------------------------------
|
||||
; if changes made, delete the original file and save the new content to it
|
||||
@@ -731,23 +682,21 @@ if(VideoDescription != OriginalVideoDescription){
|
||||
}
|
||||
|
||||
|
||||
|
||||
; -------------------------------/Save Video Info-------------------------------
|
||||
|
||||
; Save Script Settings to File
|
||||
; ------------------------------------------------
|
||||
; 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, %ErrorLogToDiscord%, %SettingsIniFilepath%, %ScriptSettingsSection%, ErrorLogToDiscord
|
||||
IniWrite, %DiscordPingOnCompletion%, %SettingsIniFilepath%, %ScriptSettingsSection%, DiscordPingOnCompletion
|
||||
IniWrite, %KillLBRYAfterUpload%, %SettingsIniFilepath%, General, KillLBRYAfterUpload
|
||||
IniWrite, %ConfirmBeforeSubmit%, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit
|
||||
|
||||
; Used by Post Scheduler, filepath changes between script updates
|
||||
IniWrite, %A_ScriptFullPath%, %SettingsIniFilepath%, Filepaths, VideoUploaderFilepath
|
||||
|
||||
if(VideoFilepath = ""){
|
||||
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
||||
run, "%A_ScriptFullPath%" "LastPost"
|
||||
ExitApp
|
||||
}
|
||||
StartScheduledPost:
|
||||
|
||||
; Format the LBRYURLSlug to be API Compatible
|
||||
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
|
||||
@@ -762,22 +711,18 @@ IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||
|
||||
|
||||
|
||||
; -------------------------------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 Info To Text-------------------------------s
|
||||
(Bitchute)?(PostedWebsites .= "Bitchute|") : ()
|
||||
(Locals)?(PostedWebsites .= "Locals|") : ()
|
||||
(Rumble)?(PostedWebsites .= "Rumble|") : ()
|
||||
(Brighteon)?(PostedWebsites .= "Brighteon|") : ()
|
||||
(DailyMotion)?(PostedWebsites .= "DailyMotion|") : ()
|
||||
(OdyseeVideo)?(PostedWebsites .= "OdyseeVideo|") : ()
|
||||
(OdyseeAudio)?(PostedWebsites .= "OdyseeAudio|") : ()
|
||||
|
||||
|
||||
; 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
|
||||
@@ -801,6 +746,7 @@ 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-------------------------------
|
||||
|
||||
@@ -895,9 +841,7 @@ if(LocalsGrabURL){
|
||||
; ------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
if(URLOfLastErrorPage != ""){
|
||||
if(URLOfLastErrorPage){
|
||||
Message = Activating Tab of last failed post.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||
|
||||
@@ -913,7 +857,7 @@ else,
|
||||
Message = All Videos Uploaded Successfully
|
||||
|
||||
|
||||
if(PingOnCompletion)
|
||||
if(DiscordPingOnCompletion)
|
||||
Message = <@%DiscordUsernameID%>: %Message%
|
||||
else,
|
||||
Message = %Message%
|
||||
@@ -932,7 +876,6 @@ Gui, Destroy ; destroy GUI in case we're going from the main screen to results w
|
||||
|
||||
IniRead, MouseClicksSaved, %SettingsIniFilepath%, General, MouseClicksSaved, %A_Space%
|
||||
IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, %A_Space%
|
||||
; IniRead, StreamanityURL, %VideoLinksIniFile%, URLs, StreamanityURL, %A_Space%
|
||||
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
||||
|
||||
IniRead, OdyseeVideoURL, %VideoLinksIniFile%, URLs, OdyseeVideoURL, %A_Space%
|
||||
@@ -947,7 +890,6 @@ OdyseeAudioThumb := StrReplace(OdyseeAudioThumb, "Thumb:", "")
|
||||
|
||||
IniRead, LocalsURL, %VideoLinksIniFile%, URLs, LocalsURL, %A_Space%
|
||||
IniRead, RumbleURL, %VideoLinksIniFile%, URLs, RumbleURL, %A_Space%
|
||||
IniRead, FacebookURL, %VideoLinksIniFile%, URLs, FacebookURL, %A_Space%
|
||||
IniRead, BrighteonURL, %VideoLinksIniFile%, URLs, BrighteonURL, %A_Space%
|
||||
IniRead, DailyMotionURL, %VideoLinksIniFile%, URLs, DailyMotionURL, %A_Space%
|
||||
IniRead, PodcastNumber, %VideoLinksIniFile%, Misc, PodcastNumber, %A_Space%
|
||||
@@ -970,12 +912,59 @@ if(PodcastNumber = "") {
|
||||
|
||||
; Show Results GUI Window
|
||||
; ------------------------------------------------
|
||||
#include %A_scriptDir%\Modules\GUI-Results-Window.ahk
|
||||
|
||||
gosub, SetGUIVariables
|
||||
gosub, SetAndShowResultsGUI
|
||||
; #include %A_scriptDir%\Modules\GUI-Results-Window.ahk
|
||||
|
||||
SaveCurrentChromeVersionToIniFile()
|
||||
|
||||
Return
|
||||
|
||||
|
||||
|
||||
; GoTo's
|
||||
; ------------------------------------------------
|
||||
|
||||
SubmitScheduler:
|
||||
Gui, Submit
|
||||
|
||||
; format and combine date and time
|
||||
FormatTime, ScheduledDateOnly , %ScheduledDate%, yyyyMMdd
|
||||
FormatTime, ScheduledTimeOnly , %ScheduledTime%, HHmmss
|
||||
TimeStamp := ScheduledDateOnly . ScheduledTimeOnly
|
||||
|
||||
; create schedule post ini file
|
||||
ScheduleFileFilepath = %A_scriptDir%/Scheduled-Posts
|
||||
if(!FileExist(ScheduleFileFilepath)){
|
||||
FileCreateDir, %ScheduleFileFilepath%
|
||||
}
|
||||
ScheduleFileFilepath = %ScheduleFileFilepath%\%TimeStamp%.ini
|
||||
|
||||
IniWrite, %TimeStamp%, %ScheduleFileFilepath%, Schedule-Info, Timestamp
|
||||
IniWrite, %BodyTextFilePath%, %ScheduleFileFilepath%, Schedule-Info, ProjectFilepath
|
||||
IniWrite, Video, %ScheduleFileFilepath%, Schedule-Info, PostType
|
||||
IniWrite, %VideoTitle%, %ScheduleFileFilepath%, Schedule-Info, Title
|
||||
|
||||
; Generate variable with each of the checked ON sites
|
||||
(BitChute)?(VideoSites .= "Bitchute" . "|"):()
|
||||
(Locals)?(VideoSites .= "Locals" . "|"):()
|
||||
(OdyseeVideo)?(VideoSites .= "OdyseeVideo" . "|"):()
|
||||
(OdyseeAudio)?(VideoSites .= "OdyseeAudio" . "|"):()
|
||||
(Brighteon)?(VideoSites .= "Brighteon" . "|"):()
|
||||
(DailyMotion)?(VideoSites .= "DailyMotion" . "|"):()
|
||||
(Rumble)?(VideoSites .= "Rumble" . "|"):()
|
||||
|
||||
IniWrite, %VideoSites%, %ScheduleFileFilepath%, Schedule-Info, Sites
|
||||
|
||||
if(!FileExist(PostSchedulerFilepath)){
|
||||
gosub, UpdatePostScheduler
|
||||
}
|
||||
else,
|
||||
run, %PostSchedulerFilepath%
|
||||
|
||||
Return
|
||||
|
||||
OpenLBRYBlobFilesFolder:
|
||||
try,
|
||||
run, C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\blobfiles
|
||||
@@ -988,7 +977,7 @@ StartSocialMediaPoster:
|
||||
; IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, General, FDRRadioUN, %A_Space%
|
||||
IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath, %A_Space%
|
||||
|
||||
if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
||||
if(!SocialMediaPosterFilepath or !FileExist(SocialMediaPosterFilepath)){
|
||||
OnMessage(0x44, "OnMsgBoxSocialMediaPoster")
|
||||
MsgBox 0x21, Filepath Not Found, Unable to find filepath for Social Media Poster`nWould you like to add it?
|
||||
OnMessage(0x44, "")
|
||||
@@ -1005,7 +994,7 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
||||
Return
|
||||
}
|
||||
|
||||
IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath
|
||||
IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
|
||||
|
||||
}
|
||||
run, %SocialMediaPosterFilepath% "%VideoLinksIniFile%"
|
||||
@@ -1019,9 +1008,10 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
||||
; ------------------------------------------------
|
||||
; @todo: this can be converted into 1 gosub, with if/else statements based on the button clicked
|
||||
|
||||
CopyPodcastNumber:
|
||||
Clipboard := PodcastNumber
|
||||
SaveOrPostProgress(Message:=PodcastNumber "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
CopyPodcastTranscriptURL:
|
||||
Clipboard := PodcastTranscriptURL
|
||||
Message := PodcastTranscriptURL . "`nCopied to Clipboard"
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
sleep, 1000
|
||||
ToolTip
|
||||
Return
|
||||
@@ -1101,7 +1091,8 @@ Return
|
||||
; @todo: Add thumbnail status to this
|
||||
; @todo: add podcast tags to this
|
||||
UpdateINI:
|
||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, URLs, PodcastNumber
|
||||
IniWrite, %UnauthorizedTVURL%, %VideoLinksIniFile%, URLs, UnauthorizedTVURL
|
||||
IniWrite, %PodcastTranscriptURL%, %VideoLinksIniFile%, URLs, PodcastTranscriptURL
|
||||
IniWrite, %VideoTitle%, %VideoLinksIniFile%, Misc, VideoTitle
|
||||
IniWrite, %LocalsURL%, %VideoLinksIniFile%, URLs, LocalsURL
|
||||
IniWrite, %RumbleURL%, %VideoLinksIniFile%, URLs, RumbleURL
|
||||
@@ -1195,6 +1186,10 @@ Return
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Podcast-Upload.ahk
|
||||
|
||||
; Miscellaneous-Functions
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk
|
||||
; Update Functionality
|
||||
; ------------------------------------------------
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Shared-GoTos.ahk
|
||||
|
||||
; GUI Windows
|
||||
; ------------------------------------------------
|
||||
#include C:\Users\%A_Username%\Syncthing\Git\Freedomain-Video-Uploader\Modules\GUI-Main-Window.ahk
|
||||
|
||||
Submodule Lib/Freedomain-Posters-Shared-Functions updated: e32fe026e9...a3d89a9892
@@ -124,11 +124,15 @@ 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 {
|
||||
BitchuteTags .= VideoTagsArray[A_Index] . " "
|
||||
BitchuteTags .= ArrayOfVideoTags[A_Index] . " "
|
||||
}
|
||||
|
||||
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:=BitchuteTags)
|
||||
@@ -137,6 +141,13 @@ 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
|
||||
@@ -261,7 +272,6 @@ try driver.executeScript("history.go(0)") ;refresh page
|
||||
|
||||
try FirstResultVideoTitle := driver.findElementsByClass("channel-videos-title").item[1].Attribute("innerText") ; Grabb innertext
|
||||
|
||||
; msgbox % FirstResultVideoTitle = VideoTitle
|
||||
|
||||
try FirstResultIDAndTag := driver.findElementsByClass("channel-videos-title").item[1].Attribute("outerHTML") ;XPath: ID=site-title & span tag
|
||||
; Msgbox % "FirstResultIDAndTag: " FirstResultIDAndTag
|
||||
|
||||
@@ -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){
|
||||
@@ -62,14 +63,6 @@ if(InStr(CurrentTab, "login")) ; we're logged out
|
||||
Message = Trying to Log Back In
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile, DiscordErrorLogging")
|
||||
|
||||
; js = return document.querySelector("input[placeholder='username/email']").value;
|
||||
; status := try driver.executeScript(JS) ;Execute Javascript
|
||||
|
||||
; sleep, 5000
|
||||
; Msgbox % "status: " status
|
||||
|
||||
; if(StrLen(Status) > 0){
|
||||
; msgbox, clicking login button
|
||||
Xpath = //a[normalize-space()='Log In'] ; click login button at top right of page
|
||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||
|
||||
@@ -79,8 +72,6 @@ if(InStr(CurrentTab, "login")) ; we're logged out
|
||||
try driver.executeScript("return document.readyState").equals("complete")
|
||||
|
||||
sleep, 2000
|
||||
; }
|
||||
|
||||
|
||||
}
|
||||
else, {
|
||||
@@ -88,7 +79,7 @@ if(InStr(CurrentTab, "login")) ; we're logged out
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +103,10 @@ try driver.FindElementByXPath(Xpath).click()
|
||||
|
||||
CheckForAlerts()
|
||||
|
||||
if(BrighteonUploadAttempt){
|
||||
Sleep, 2000
|
||||
}
|
||||
|
||||
Message = Uploading Video
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
; Upload Video
|
||||
@@ -133,6 +128,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 +176,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
|
||||
}
|
||||
@@ -187,8 +212,8 @@ Loop, 10 {
|
||||
|
||||
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,9 +243,9 @@ 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,
|
||||
|
||||
@@ -246,10 +246,10 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
||||
; 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(){
|
||||
Loop % ArrayOfVideoTags.Length(){
|
||||
; ArrayItem := ARRAY[A_Index]
|
||||
; MsgBox %
|
||||
DailyMotionVideoTags .= VideoTagsArray[A_Index] . ","
|
||||
DailyMotionVideoTags .= ArrayOfVideoTags[A_Index] . ","
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,56 +1,63 @@
|
||||
;---GUI Variables---
|
||||
;------------------------------------------------
|
||||
SetGUIVariables:
|
||||
GuiHeight = 800
|
||||
GuiWidth = 1366
|
||||
GuiFontSize = 10
|
||||
|
||||
ButtonHeights := 30
|
||||
ResultsActionButtonHeights := 50
|
||||
|
||||
MarginSpace := 10
|
||||
MarginSpaceDoubled := MarginSpace * 2
|
||||
MarginSpaceTripled := MarginSpace * 3
|
||||
MarginSize := 10
|
||||
MarginSizeDoubled := MarginSize * 2
|
||||
MarginSizeTripled := MarginSize * 3
|
||||
|
||||
EditBoxWidths := (GuiWidth / 100) * 60
|
||||
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSpace / 2)
|
||||
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSize / 2)
|
||||
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
|
||||
|
||||
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSpace * 3)
|
||||
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSpace
|
||||
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSize * 3)
|
||||
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSize
|
||||
|
||||
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
|
||||
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
|
||||
|
||||
|
||||
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSpaceDoubled
|
||||
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSizeDoubled
|
||||
|
||||
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSpace / 2)
|
||||
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
||||
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSize / 2)
|
||||
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSize * 2)
|
||||
|
||||
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSpace - 2)
|
||||
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
||||
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSize - 2)
|
||||
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSize * 2)
|
||||
|
||||
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
|
||||
DescriptionCharCountXPos := EditBoxWidths - 40
|
||||
DescriptionCharCountXPos := EditBoxHalfWidths - 40
|
||||
|
||||
PageTwoXStartPos := EditBoxWidths + 50
|
||||
|
||||
CopyButtonWidths := 150
|
||||
ResultEditBoxXPos := CopyButtonWidths + MarginSpace + 5
|
||||
ResultEditBoxWidths := EditBoxWidths - CopyButtonWidths
|
||||
ResultEditBoxXPos := CopyButtonWidths + MarginSize + 5
|
||||
ResultEditBoxWidth := EditBoxWidths - ( CopyButtonWidths)
|
||||
|
||||
ResultEditBoxHalfWidths := (ResultEditBoxWidths / 2) - (MarginSpace /2)
|
||||
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidths / 4)
|
||||
ResultsEditAndCopyButtonWidth := CopyButtonWidths + ResultEditBoxWidth + MarginSize
|
||||
ResultsGUIWidth := ResultsEditAndCopyButtonWidth + ErrorLogEditBoxWidth + MarginSize
|
||||
|
||||
|
||||
ErrorLogEditBoxXPos := ResultEditBoxWidth + CopyButtonWidths + 30
|
||||
ErrorLogEditBoxHeight := ButtonHeights * 14 + (MarginSize * 9)
|
||||
ErrorLogEditBoxWidth := 330
|
||||
|
||||
|
||||
ResultEditBoxHalfWidths := (((ResultEditBoxWidth + CopyButtonWidths)) - (MarginSize * 3))
|
||||
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidth / 4)
|
||||
ResultLBRYURLEditBoxWidths := ResultLBRYURLEditBoxWidthPieces * 3
|
||||
|
||||
ResultEditBoxThirdsWidths := (ResultEditBoxWidths / 3) - (MarginSpace /3)
|
||||
|
||||
ResultEditBoxThirdsWidths := (ResultEditBoxWidth / 3) - (MarginSize /3)
|
||||
ResultsScreenOneThirdsWidth := (ResultEditBoxWidth + CopyButtonWidths + ErrorLogEditBoxWidth) / 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
|
||||
@@ -67,11 +74,11 @@ PageTwoGroupBoxWidth := ThumbnailPreviewWidth + 20
|
||||
VideoDescriptionEditBoxHeight = 100
|
||||
CheckboxesStartYPos := 630
|
||||
|
||||
FilePathEditBoxWidths := EditBoxWidths - MarginSpace - 70
|
||||
FilePathEditBoxWidths := EditBoxWidths - MarginSize - 70
|
||||
SelectFileButtonWidths := 30
|
||||
|
||||
ButtonStartYPos := CheckboxesStartYPos + 10
|
||||
MarginSquared := MarginSpace * 2
|
||||
MarginSquared := MarginSize * 2
|
||||
|
||||
if(DevMode){
|
||||
MainButtonHeight := 30
|
||||
@@ -84,14 +91,18 @@ else, {
|
||||
}
|
||||
|
||||
|
||||
Return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; -------------------------------GUI-------------------------------
|
||||
SetAndShowMainGUI:
|
||||
Gosub, SetGUIVariables
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Margin, %MarginSpace%, %MarginSpace%
|
||||
Gui, Margin, %MarginSize%, %MarginSize%
|
||||
|
||||
; Video Title
|
||||
Gui, Font, Bold
|
||||
@@ -101,56 +112,50 @@ 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%
|
||||
Gui, Add, Edit, y+5 x%MarginSize% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTitle, %VideoTitle%
|
||||
Gui, Add, Edit, yp+0 x+%MarginSize% w%OdyseeURLSlugEditWidth% h%EditBoxHeight% gUpdateVars vLBRYURLSlug, %LBRYURLSlug%
|
||||
Gui, Add, Edit, yp+0 x+%MarginSize% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
|
||||
|
||||
; LBRY URL
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Text, x%Marginspace%,Video Tags (Comma Seperated)
|
||||
Gui, Add, Text, x%MarginSize%,Video Tags (Comma Seperated)
|
||||
Gui, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
|
||||
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
||||
Gui, Add, Edit, yp+0 x+%Marginspace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
||||
Gui, Add, Edit, x%MarginSize% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
||||
Gui, Add, Edit, yp+0 x+%MarginSize% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
||||
|
||||
|
||||
; Video Description
|
||||
; Description/Summary Headers
|
||||
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, Add, Text,y+%MarginSize% x%MarginSize%,Description
|
||||
Gui, Add, Text,yp+0 x%ColumnOneHalfWidthXPos%,Summary
|
||||
|
||||
Gui, Font, Normal
|
||||
; Video Description edit box
|
||||
Gui, Add, Edit,x%MarginSize% y+5 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
||||
; Video Summary Edit Box
|
||||
Gui, Add, Edit,x%ColumnOneHalfWidthXPos% yp+0 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoSummary gUpdateVars,%VideoSummary%
|
||||
|
||||
|
||||
Gui, Font, Normal
|
||||
Gui, 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, Add, Edit, x%MarginSize% y+5 vDescriptionCharCount, %DescriptionCharCount%
|
||||
Gui, Add,Text, yp+4 x+%MarginSize%,Limits: DM+Bitchute = 3K, Odysee, Brighteon = 5K
|
||||
; Gui, font, Bold
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, font, Bold
|
||||
Gui, Add, GroupBox,r8.5 x%MarginSpace% yp+10 w%EditBoxWidths% Center, Filepaths
|
||||
|
||||
|
||||
|
||||
Gui, Add, GroupBox,r8.5 x%MarginSize% y+10 w%EditBoxWidths% Center, Filepaths
|
||||
|
||||
; Video Filepath
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Text,xp+5 yp+15,Video Filepath
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoFilepath,%VideoFilepath%
|
||||
Gui, Add, Button, x+5 yp+0 h%EditBoxHeight% gSelectVideoFilepath, Select
|
||||
Gui, Add, Button, x+%MarginSize% yp+0 h%EditBoxHeight% gSelectVideoFilepath, Select
|
||||
|
||||
; Video Thumbnail Filepath
|
||||
Gui, Font, Bold
|
||||
@@ -160,7 +165,7 @@ 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
|
||||
Gui, Add, Button, x+%MarginSize% yp+0 h%EditBoxHeight% gSelectVideoThumbFilepath, Select
|
||||
; WAV Audio File Filepath
|
||||
Gui, Font, Bold
|
||||
if(WavAudioFilepath = "")
|
||||
@@ -173,7 +178,7 @@ else, { ; change text depending on if WAV or FLAC file
|
||||
}
|
||||
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, Add, Button, x+%MarginSize% yp+0 h%EditBoxHeight% gSelectWAVFilepath, Select
|
||||
|
||||
Gui, Font, Bold
|
||||
if(MP3AudioFilepath = "")
|
||||
@@ -182,138 +187,108 @@ 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
|
||||
Gui, Add, Button, x+%MarginSize% 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,
|
||||
Gui, Add, Button, w%EditBoxFourthWidths% x%MarginSize% vUpdateAvailable h%SecondaryButtonHeights% gUpdateScript,FVU Up-to-Date
|
||||
|
||||
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h%SecondaryButtonHeights% gOpenProjectFolder, Open Folder
|
||||
|
||||
; 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, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gScheduleUpload, Schedule for Later
|
||||
|
||||
}
|
||||
; Gui, Font, s20
|
||||
; Gui, Font, Bold
|
||||
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
|
||||
; Gui, Add, Button, w%EditBoxFourthWidths% x%MarginSize% y+%MarginSize% h%SecondaryButtonHeights% gOpenProjectFolder, Open New Project
|
||||
|
||||
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vChromeUpdateAvailable gUpdateChrome, Chrome Up-to-Date
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Add, Button, x+%MarginSize% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Status
|
||||
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
|
||||
|
||||
; 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
|
||||
Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable gUpdatePostScheduler, Post Scheduler Up-To-Date
|
||||
; Gui, Add, Button, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vPostSchedulerUpdateAvailable, Post Scheduler Up-To-Date
|
||||
|
||||
|
||||
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
|
||||
Gui, Add, Button, x%MarginSize% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
|
||||
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h30 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
|
||||
LineSplitXPosition := PageTwoXStartPos - ( 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
|
||||
LineSplitXPosition := PageTwoXStartPos - ( MarginSize * 2)
|
||||
gui, add, text, x%LineSplitXPosition% y20 h600 0x11 ; 0x11 is a "line"
|
||||
|
||||
; Miscellaneous Settings
|
||||
; DevMode Buttons
|
||||
gui, Font, s4
|
||||
Gui, Font, Normal
|
||||
DevModToggleButton := PageTwoXStartPos + 160
|
||||
Gui, Add, Button, x%DevModToggleButton% y5 w50 h10 gToggleDevMode,DevMode
|
||||
Gui, Add, Button, x+5 y5 w50 h10 gToggleTestingMode, Testing Mode
|
||||
Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
|
||||
Gui, Add, Button, x+%MarginSize% y5 w50 h10 gToggleTestingMode, Testing Mode
|
||||
Gui, Add, Button, x+%MarginSize% y5 w50 h10 gOpenGiteaPage, Gitea
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
Gui, Font, Normal
|
||||
|
||||
; 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
|
||||
Gui, Add, GroupBox,r6 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
||||
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheck%, Auto Update Check
|
||||
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgress% gUpdateVars,Show Tooltip of Actions
|
||||
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUpload%, Kill LBRY After Uploading
|
||||
Gui, Add, Checkbox, vErrorLogToDiscord gUpdateVars Checked%ErrorLogToDiscord%, Error Log to Discord
|
||||
Gui, Add, Checkbox, vDiscordPingOnCompletion gUpdateVars Checked%DiscordPingOnCompletion%, Discord Ping Upon Completion
|
||||
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit
|
||||
|
||||
|
||||
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSpace
|
||||
GroupBoxCheckboxPos := PageTwoXStartPos + MarginSize
|
||||
|
||||
; -------------------------------PLATFORMS-------------------------------
|
||||
Gui, Add, GroupBox,r6 y+%MarginSpaceTripled% x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%, Platforms
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
Gui, Add, GroupBox,r6 y+%MarginSizeTripled% 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
|
||||
Gui, Font, s8
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, xp+80 yp+0 gUncheckAllPlatforms, Uncheck All
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% yp+30 vBitChute Checked%BitChute% gUpdateVars, BitChute
|
||||
|
||||
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
||||
; msgbox, checking grab url
|
||||
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocalsGrabURL Checked%LocalsCheckStatus% gUpdateVars, Locals (Grab URL)
|
||||
Gui, Add, Checkbox, x+%MarginSizeTripled% yp+0 vLocalsGrabURL Checked%Locals% gUpdateVars, Locals (Grab URL)
|
||||
LocalsGrabURL := 1
|
||||
Locals := 0
|
||||
}
|
||||
else, {
|
||||
; msgbox, checking locals
|
||||
Gui, Add, Checkbox, x+%MarginSpaceTripled% yp+0 vLocals Checked%LocalsCheckStatus% gUpdateVars, Locals
|
||||
Gui, Add, Checkbox, x+%MarginSizeTripled% yp+0 vLocals Checked%Locals% gUpdateVars, Locals
|
||||
LocalsGrabURL := 0
|
||||
Locals := 1
|
||||
}
|
||||
|
||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeVideo Checked%OdyseeVideoCheckStatus% gUpdateVars, Odysee Video
|
||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vOdyseeVideo Checked%OdyseeVideo% gUpdateVars, Odysee Video
|
||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vOdyseeAudio Checked%OdyseeAudio% gUpdateVars, Odysee Audio
|
||||
|
||||
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
|
||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vRumble Checked%Rumble% gUpdateVars, Rumble
|
||||
|
||||
if(VideoTotalBitrate > 300000)
|
||||
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
|
||||
Gui, Add, Checkbox, vBrighteon y+%MarginSize% Checked%Brighteon% gUpdateVars, Brighteon
|
||||
else,{
|
||||
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSpace% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
||||
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
||||
}
|
||||
|
||||
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
|
||||
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
|
||||
Gui, Add, Checkbox, vDailyMotion y+%MarginSize% Checked%DailyMotion% gUpdateVars, DailyMotion
|
||||
|
||||
; Gui, Font, s12
|
||||
gui, Font, Bold
|
||||
Gui, Add, GroupBox, r6.5 y+%MarginSpaceTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
Gui, Add, GroupBox, r6.5 y+%MarginSizeTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
|
||||
gui, Font, Normal
|
||||
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
|
||||
|
||||
@@ -334,4 +309,170 @@ Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
|
||||
ControlFocus, Edit4, %FullScriptName%
|
||||
ToolTip
|
||||
|
||||
; calculate run time and convert to seconds
|
||||
URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
|
||||
; - Check for Updates
|
||||
;------------------------------------------------
|
||||
if(AutoUpdateCheck AND !UpdateAvailable){
|
||||
SetTimer, CheckForUpdates, -1000
|
||||
}
|
||||
|
||||
; calculate run time and convert to seconds
|
||||
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
Return
|
||||
|
||||
|
||||
|
||||
|
||||
; Scheduler GUI
|
||||
; ------------------------------------------------
|
||||
ScheduleUpload:
|
||||
gui, Submit, NoHide ; submit the main GUI so all the variables get updated
|
||||
|
||||
; Create GUI for Scheduler
|
||||
Gui, ScheduleGUI:New
|
||||
Gui, Font, s15
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Text,, Date:
|
||||
Gui, Add, DateTime,w%EditBoxHalfWidths% vScheduledDate , MM/dd/yyyy
|
||||
Gui, Add, Text,, Time:
|
||||
Gui, Add, DateTime, w%EditBoxHalfWidths% vScheduledTime Choose200505311900, Time
|
||||
Gui, Add, Button,w%EditBoxHalfWidths% gSubmitScheduler, Schedule
|
||||
Gui, Show,, Scheduler
|
||||
|
||||
Return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; Results GUI Screen
|
||||
; ------------------------------------------------
|
||||
SetAndShowResultsGUI:
|
||||
; Set the GUI Variables, needed if called from Scheduler
|
||||
Gosub, SetGUIVariables
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTranscriptURL,Transcript URL
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% w%ResultEditBoxWidth% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidth% gUpdateVars , %BitChuteURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyBrighteonURL, Brighteon
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidth% gUpdateVars , %BrighteonURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyDailyMotionURL, DailyMotion
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidth% gUpdateVars , %DailyMotionURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeVideoURL, Odysee Video
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidth% gUpdateVars, %OdyseeVideoURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeAudioURL, Odysee Audio
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidth% gUpdateVars , %OdyseeAudioURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyRumbleURL, Rumble
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidth% gUpdateVars , %RumbleURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths%, Locals
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidth% gUpdateVars, %LocalsURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths%, Unauthorized
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vUnauthorizedTVURL w%ResultEditBoxWidth% gUpdateVars, %UnauthorizedTVURL%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoTags vVideoTagsEdit, Video Tags
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidth% gUpdateVars , %VideoTags%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTags, Podcast Tags
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidth% gUpdateVars , %Podcasttags%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Description
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoDescription w%ResultEditBoxWidth% gUpdateVars , %VideoDescription%
|
||||
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyVideoDescription, Summary
|
||||
Gui, Font, Normal
|
||||
|
||||
Gui, Font, Normal
|
||||
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoSummary w%ResultEditBoxWidth% gUpdateVars , %VideoSummary%
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% w%ResultsEditAndCopyButtonWidth% h%SecondaryButtonHeights% gUpdateINI, Save Modified Links to Files
|
||||
|
||||
|
||||
; Error Log Column
|
||||
; ------------------------------------------------
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Add, Button, x+%MarginSize% y%MarginSize% w%ErrorLogEditBoxWidth% h%ButtonHeights% y%MarginSize%, 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
|
||||
|
||||
|
||||
|
||||
Gui, add, text, x%MarginSize% y+%MarginSize% w%ResultsGUIWidth% 0x10 ;Horizontal Line > Etched Gray
|
||||
|
||||
|
||||
|
||||
; Results GUI Action Buttons
|
||||
; ------------------------------------------------
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
Gui, Add, Button, x%MarginSize% yp+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gOpenLBRYBlobFilesFolder, Open LBRY Blob Folder
|
||||
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gUploadPodcast vUploadPodcast, Upload Podcast
|
||||
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gRetryUpload, Try Failed Again
|
||||
|
||||
|
||||
Gui, Add, Button, x%MarginSize% y+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToDiscord vPostToDiscordButton, Post to Discord
|
||||
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gPostToTelegram vPostToTelegramButton, Post to Telegram
|
||||
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gStartSocialMediaPoster, Start Social Media Poster
|
||||
|
||||
; Row 3
|
||||
; Gui, Add, Button, x%ResultEditBoxXPos% y+%MarginSize% w%ResultsScreenOneThirdsWidth% h%ButtonHeights%,
|
||||
|
||||
|
||||
; Gui, Add, Button, x+%MarginSize% w%ResultEditBoxHalfWidths% w%ButtonWidths% h%ButtonHeights% gCancelPost , Close
|
||||
; Gui, Add, Button, x+%MarginSize% w%ResultEditBoxHalfWidths% gKillScript %ButtonWidths% , Close
|
||||
; gui, Add, Text, y+10
|
||||
|
||||
OriginalVideoDescription := VideoDescription
|
||||
OriginalPodcastTags := PodcastTags
|
||||
|
||||
|
||||
if(XPosition and YPosition)
|
||||
Gui, Show,x%XPosition% y%YPosition%,%FullScriptName% - Uploads Status
|
||||
else,
|
||||
Gui, Show,,%FullScriptName% - Uploads Results
|
||||
Return
|
||||
@@ -1,94 +0,0 @@
|
||||
|
||||
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,
|
||||
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
|
||||
@@ -21,31 +21,6 @@ CheckLBRYProcess() ; double check lbry process
|
||||
|
||||
SaveOrPostProgress(Message:="Starting Upload",PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
|
||||
; If LBRY Killer not found, then download it
|
||||
; @todo: Add LBRY kill download functionality from gitea
|
||||
|
||||
LBRYKillerPath := LibFolder . "\LBRY Process Killer.exe"
|
||||
if(!FileExist(LBRYKillerPath)){
|
||||
|
||||
; Msgbox % "LBRYKillerPath: " LBRYKillerPath
|
||||
; Msgbox % "LBRYProcessKillerURL: " LBRYProcessKillerURL
|
||||
LBRYKillerPath = %A_ScriptDir%\Lib\LBRY Process Killer.exe
|
||||
LBRYKillerUpdateURL = https://freedomain.dev/yuriy/video-uploader/raw/branch/main/Modules/LBRY-Process-Killer.exe
|
||||
|
||||
Message = LBRY Process Killer Not Found. Automatically Downloading.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
UrlDownloadToFile, %LBRYKillerUpdateURL%, %LBRYKillerPath%
|
||||
if(ErrorLevel){
|
||||
Message = Failed to download the the LBRY-Killer.exe from %LBRYKillerUpdateURL%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
TooltipThis("Uploading Video through API")
|
||||
; Variables of items that need to be replaced before argument is passed to API
|
||||
Apostrophe = '
|
||||
@@ -201,13 +176,6 @@ if(!InStr(UploadResult, "permanent_url")){ ; if no permanent_url is generated th
|
||||
Return
|
||||
}
|
||||
|
||||
if(KillLBRYAfterUpload){
|
||||
try run, %LBRYKillerPath%
|
||||
catch e {
|
||||
Message = LBRYKiller not found. Unable to find File.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
}
|
||||
}
|
||||
|
||||
; Transform the Upload Result json into the LBRY.tv link
|
||||
; PermanentURL := GetPermanentLBRYURL(UploadResult) ; get permanentURL from the upload result json
|
||||
@@ -360,7 +328,40 @@ if(LBRYUploadType = "Audio"){
|
||||
IniWrite, %OdyseeAudioURL%, %VideoLinksIniFile%, URLs, OdyseeAudioURL
|
||||
}
|
||||
|
||||
if(!LBRYKillerStarted){
|
||||
|
||||
; If LBRY Killer not found, then download it
|
||||
; @todo: Add LBRY kill download functionality from gitea
|
||||
LBRYKillerPath := LibFolder . "\LBRY Process Killer.exe"
|
||||
if(!FileExist(LBRYKillerPath)){
|
||||
|
||||
; Msgbox % "LBRYKillerPath: " LBRYKillerPath
|
||||
; Msgbox % "LBRYProcessKillerURL: " LBRYProcessKillerURL
|
||||
LBRYKillerPath = %A_ScriptDir%\Lib\LBRY Process Killer.exe
|
||||
LBRYKillerUpdateURL = https://freedomain.dev/yuriy/video-uploader/raw/branch/main/Modules/LBRY-Process-Killer.exe
|
||||
|
||||
Message = LBRY Process Killer Not Found. Automatically Downloading.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
UrlDownloadToFile, %LBRYKillerUpdateURL%, %LBRYKillerPath%
|
||||
if(ErrorLevel){
|
||||
Message = Failed to download the the LBRY-Killer.exe from %LBRYKillerUpdateURL%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(KillLBRYAfterUpload){
|
||||
try run, %LBRYKillerPath%
|
||||
catch e {
|
||||
Message = LBRYKiller not found. Unable to find File.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
}
|
||||
LBRYKillerStarted := 1
|
||||
}
|
||||
|
||||
}
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
; SaveDriverURL()
|
||||
AddToTotalVideosUploadedCount()
|
||||
|
||||
@@ -1,271 +0,0 @@
|
||||
|
||||
; -------------------------------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
|
||||
return SubStr(str, 1, -StrLen(sep))
|
||||
}
|
||||
|
||||
|
||||
CheckLBRYProcess(){
|
||||
; Check if LBRY Process exists
|
||||
Process, Exist,LBRY.exe
|
||||
if(ErrorLevel = 0) ; if doesn't exist
|
||||
{
|
||||
Message = Not Running. Starting up LBRY.exe
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
LBRYExeFilepath = C:\Program Files\LBRY\LBRY.exe
|
||||
if(!FileExist(LBRYExeFilepath)){
|
||||
Message = Failed to Find LBRY.exe executable. LBRY not installed?
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
Message = Checking LBRY daemon_settings.yml file for Odysee Wallet Servers
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
FileRead, daemon_settingsFileContent, C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings.yml
|
||||
|
||||
if(!InStr(daemon_settingsFileContent, "a-hub1.odysee.com")){
|
||||
Message = Odysee wallet server is not in daemon_settings.yml. Replacing File with required settings.
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",DiscordErrorLogging")
|
||||
|
||||
LBRYDaemonSettingsFP = C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings.yml
|
||||
LBRYDaemonSettingsBackupFP = C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings_BU.yml
|
||||
|
||||
|
||||
; Msgbox % "daemon_settingsText: " daemon_settingsText
|
||||
FileMove, %LBRYDaemonSettingsFP%, %LBRYDaemonSettingsBackupFP%, 1 ; Dest [, Flag (1 = overwrite)]
|
||||
|
||||
UrlDownloadToFile, https://freedomain.dev/yuriy/video-uploader/raw/branch/main/Assets/daemon_settings.yml , %LBRYDaemonSettingsFP%
|
||||
|
||||
sleep, 1000
|
||||
|
||||
if(!FileExist(LBRYDaemonSettingsFP)){
|
||||
Message = Failed to download the custom daemon_settings.yml file from git. Restoring Original File
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
FileMove,%LBRYDaemonSettingsBackupFP%,%LBRYDaemonSettingsFP%, 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try run, "%LBRYExeFilepath%"
|
||||
Message = Waiting 1 Minute for LBRY to start up
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||
Sleep, 60000 ; 1 minute
|
||||
|
||||
Process, Exist,LBRY.exe
|
||||
if(ErrorLevel = 0) ; if doesn't exist
|
||||
{
|
||||
Message = Failed to Start LBRY.exe after 60 seconds of waiting
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
WinMinimize, LBRY
|
||||
}
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
GetPermanentLBRYURL(UploadResult){
|
||||
SingleQuotationmark = "
|
||||
|
||||
UploadResult := StrSplit(UploadResult, "`n") ; split results by new line
|
||||
|
||||
; Iterate through the array of the results
|
||||
Loop % UploadResult.Length() {
|
||||
PermanentURL := UploadResult[A_Index]
|
||||
if(InStr(PermanentURL, "permanent_url"))
|
||||
Break
|
||||
}
|
||||
|
||||
; Starting Result: "permanent_url": "lbry://Test-Video-161-Numbered#c9ad9afe54c7178d6f870b59bbe129aef8efc3ff",
|
||||
PermanentURL := StrSplit(PermanentURL, "lbry:")
|
||||
PermanentURL := "lbry:" . PermanentURL[2]
|
||||
PermanentURL := StrReplace(PermanentURL, ",", "")
|
||||
PermanentURL := StrReplace(PermanentURL, SingleQuotationmark, "")
|
||||
PermanentURL := StrReplace(PermanentURL, "`n", "")
|
||||
PermanentURL := StrReplace(PermanentURL, "`r", "")
|
||||
|
||||
; End Result lbry://Test-Video-161-Numbered#c9ad9afe54c7178d6f870b59bbe129aef8efc3ff
|
||||
Return PermanentURL
|
||||
}
|
||||
|
||||
|
||||
GetLBRYCanonicalURL(LBRYJSONObject){ ; input json string
|
||||
; ResolveURL := StrSplit(LBRYResolveAPICommand, "lbry://")
|
||||
; ResolveURL := "lbry://" . ResolveURL[2]
|
||||
; StrReplace(Haystack, SearchText [, ReplaceText, OutputVarCount, Limit := -1])
|
||||
LBRYPermanentURLJsonOBJ := StrReplace(LBRYJSONObject, LBRYPermanentURL, "LBRYPermanentURL")
|
||||
; clipboard := LBRYPermanentURLJsonOBJ
|
||||
; DevModeMsgBox(LBRYPermanentURLJsonOBJ)
|
||||
|
||||
try parsed := JSON.Load(LBRYPermanentURLJsonOBJ)
|
||||
try LBRYCanonicalURL := parsed.LBRYPermanentURL.canonical_url
|
||||
|
||||
; DevModeMsgBox(LBRYCanonicalURL)
|
||||
|
||||
if(LBRYCanonicalURL = ""){
|
||||
Return "" ; return blank
|
||||
}
|
||||
|
||||
; otherwise return the LBRY url
|
||||
LBRYCanonicalURL := StrReplace(LBRYCanonicalURL, "lbry://", "https://lbry.tv/")
|
||||
Return LBRYCanonicalURL
|
||||
}
|
||||
|
||||
|
||||
LBRYCMDTextReplacement(LBRYURLSlug){
|
||||
SingleQUote = "
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, " ", "_") ; replace all spaces with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ":", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ",", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "?", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "!", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "`;", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "/", "_") ; replace all colons with dashes
|
||||
; LBRYURLSlug := StrReplace(LBRYURLSlug, "?", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "<", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ">", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, SingleQUote, "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "'", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "=", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ";", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ")", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "(", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "___", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "__", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "__", "_") ; replace all colons with dashes
|
||||
Return LBRYURLSlug
|
||||
}
|
||||
|
||||
GetLBRYAPIErrorFromString(UploadResult){
|
||||
UploadResultArray := StrSplit(UploadResult, "message")
|
||||
LBRYAPIError := UploadResultArray[2]
|
||||
; LBRYAPIErrorStrLen := StrLen(LBRYAPIError)
|
||||
|
||||
; LBRYAPIErrorStrToTrim := LBRYAPIErrorStrLen - 3
|
||||
; Msgbox % "LBRYAPIErrorStrToTrim: " LBRYAPIErrorStrToTrim
|
||||
LBRYAPIError := SubStr(LBRYAPIError, 4)
|
||||
LBRYAPIError := StrReplace(LBRYAPIError, "}", "")
|
||||
|
||||
|
||||
; Msgbox % "LBRYAPIError: " LBRYAPIError
|
||||
Return LBRYAPIError
|
||||
|
||||
}
|
||||
|
||||
|
||||
LogErrorToTextFile(Error){
|
||||
/* if(LogErrorsToTextFile != 1)
|
||||
Return
|
||||
*/
|
||||
ErrorLoggingFile := VideoFolderDir . "\" . "ErrorLogging.txt"
|
||||
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
||||
text =
|
||||
(
|
||||
|
||||
|
||||
---------------%TodayDate%---------------
|
||||
%CurrentSite%: %Error%
|
||||
|
||||
|
||||
)
|
||||
if(LogErrorsToMsgbox)
|
||||
Msgbox % "Text: " Text
|
||||
|
||||
FileAppend, %Text%, %ErrorLoggingFile%
|
||||
} ; End of Function
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
AddToTotalVideosUploadedCount(){
|
||||
; IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, %A_Space%
|
||||
TotalVideosUploaded += 1
|
||||
; IniWrite, %TotalVideosUploaded%, %SettingsIniFilepath%, General, TotalVideosUploaded
|
||||
}
|
||||
|
||||
|
||||
|
||||
OnMsgBoxPodcastFinish() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
WinMove,, 0
|
||||
}
|
||||
}
|
||||
|
||||
OnMsgBoxSocialMediaPoster() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Yes
|
||||
ControlSetText Button2, Not Now
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Check_For_Stuck_Video_Upload(Index_Number, Upload_Status){
|
||||
if(A_index = 1){ ; Create a blank array
|
||||
ProgressStatusArray := []
|
||||
Return
|
||||
}
|
||||
|
||||
Message = Upload Status: %Upload_Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||
|
||||
; if we reached the last loop number:
|
||||
if(A_index = %Number_of_loops_to_Check_Upload_status%){
|
||||
Message = Upload Most Likely Failed: Video Hasn't Finished Uploading after 1 hour.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return "Failed"
|
||||
}
|
||||
|
||||
; If progress is still the same after a ten minute interval then error out
|
||||
if(HasVal(Array_Index_Num_of_Upload_StatusChecks, A_index)){ ; if current index is in Array of index numbers to check status during
|
||||
|
||||
; Send a notification message of upload status
|
||||
Message = Upload Status: %Upload_Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
; if current upload_status is in the array of values that are updated every 10 mins
|
||||
if(HasVal(ProgressStatusArray, Upload_Status)){
|
||||
Message = Upload Failed (E#4508)`nUpload Stuck at same point for 10 minutes. Stuck Status: %ProgressStatus%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return "Failed"
|
||||
}
|
||||
ProgressStatusArray.Push(Upload_Status) ; append current status to array
|
||||
}
|
||||
} ; end of func
|
||||
|
||||
|
||||
; Find the longest word in a string of words
|
||||
FindLongestWordInString(m, calloutNumber, pos, haystack, pattern){
|
||||
Global wordLength, longestWord
|
||||
|
||||
len := StrLen(m)
|
||||
|
||||
If ( len > wordLength )
|
||||
{
|
||||
wordLength := len
|
||||
longestWord := m
|
||||
|
||||
; MsgBox, %m%
|
||||
}
|
||||
}
|
||||
@@ -216,6 +216,9 @@ Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength
|
||||
Xpath = //input[@id='url-rumble']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=RumbleURL)
|
||||
|
||||
; Input Rumble URL
|
||||
Xpath = //input[@id='url-unauthorizedtv']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=UnauthorizedTVURL)
|
||||
|
||||
; Soundcloud but actually LBRY Audio URL
|
||||
Xpath = //input[@id='url-lbry-audio']
|
||||
@@ -248,8 +251,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")
|
||||
@@ -321,6 +328,9 @@ Sublime Indentation Reset
|
||||
Message = Input Complete! `nPlease Confirm and click Final "Save" Button on Podcast Page
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
; Change GUI button from "Upload Podcast"
|
||||
GuiControl,,UploadPodcast, Podcast Uploaded
|
||||
|
||||
sleep, 5000
|
||||
|
||||
CurrentSite :=
|
||||
|
||||
@@ -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,27 +41,23 @@ 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)
|
||||
|
||||
Status := UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
||||
Message = API Response:`n%Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
|
||||
|
||||
|
||||
SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
@@ -56,24 +56,20 @@ 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,51 +79,15 @@ 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
|
||||
|
||||
; Video Description goes into TelegramMessage
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
|
||||
} ; 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
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 4097, 8192)
|
||||
Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
} ; 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
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
msgbox % StrLen(TelegramBodymessagePiece)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
} else, { ; if less than 1024 characters, send normally
|
||||
; 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
|
||||
|
||||
; Output returned data to ErrorLog File
|
||||
Message = API Response:`n%Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
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")
|
||||
@@ -139,19 +99,58 @@ if(StrLenOfMessageAndVideoLinks > 1024){
|
||||
ToolTip
|
||||
Return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; If Title, Links and Message are longer than 1024, but less than 4096, split into 2 pieces: sendphoto and sendmessage
|
||||
; ------------------------------------------------
|
||||
if(StrLenOfMessageAndVideoLinks < 4096){
|
||||
|
||||
; 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
|
||||
; Output returned data to ErrorLog File
|
||||
Message = API Response:`n%Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
; Video Description goes into TelegramMessage
|
||||
Status := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
; Output returned data to ErrorLog File
|
||||
Message = API Response:`n%Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
|
||||
} 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]
|
||||
|
||||
|
||||
Status := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
||||
; Output returned data to ErrorLog File
|
||||
Message = API Response:`n%Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||
|
||||
; Clipboard := Description
|
||||
; msgbox % Description
|
||||
|
||||
}
|
||||
; 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)
|
||||
|
||||
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordVideos")
|
||||
|
||||
}
|
||||
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
|
||||
@@ -71,6 +71,15 @@ You can select a different file in the main window if the auto selection does no
|
||||
`*.jpg` or `*.png` file which will be the thumbnail for your video/podcast<br>
|
||||
|
||||
|
||||
# LBRY Desktop Application `daemon_settings.yml`
|
||||
Due to LBRY being discontinued, the default daemon_settings that come with the LBRY Desktop application might no longer work for you due to the servers being offline.
|
||||
To fix this, add the Odysee server to the top of the list of `lbryum_servers` in the following file: `C:\Users\YOURUSERNAMEHERE\AppData\Local\lbry\lbrynet\daemon_settings.yml`
|
||||
```
|
||||
lbryum_servers:
|
||||
- a-hub1.odysee.com:50001
|
||||
- spv11.lbry.com:50001
|
||||
- spv19.lbry.com:50001
|
||||
```
|
||||
|
||||
|
||||
# Uncaught Errors
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[Video-Uploader]
|
||||
Version=3.31
|
||||
Version=3.37
|
||||
Name=Freedomain Video Uploader
|
||||
Reference in New Issue
Block a user