Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 478f8f769e | |||
| 1b856287df | |||
| 45e2d2b0f0 | |||
| 76d410e4d3 | |||
| ee21a03d55 | |||
| 540a688733 | |||
| be75660548 | |||
| 9f1388160c | |||
| 4ce82bde6a | |||
| d1e471bd26 | |||
| f5ffe32766 | |||
| dcd947b136 | |||
| 4476bfdda6 | |||
| 5f63640185 | |||
| 6639c907c9 | |||
| 3492ecccee | |||
| 38a579c486 | |||
| 4beb83caa6 | |||
| b98ae5e190 | |||
| ba0bf308b4 | |||
| 58d80bd084 | |||
| 8b1a8d407c | |||
| b59bfbe2cf |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -18,4 +18,8 @@ Compile Scripts to EXE.ahk
|
|||||||
Freedomain Video Uploader.exe
|
Freedomain Video Uploader.exe
|
||||||
Lib/LBRY Process Killer.exe
|
Lib/LBRY Process Killer.exe
|
||||||
Lib/chrome-win64
|
Lib/chrome-win64
|
||||||
Lib/Version.ini
|
Lib/Version.ini
|
||||||
|
Lib/Version-FVU.ini
|
||||||
|
Lib/Version-FPS.ini
|
||||||
|
**/Scheduled-Posts
|
||||||
|
Freedomain Post Scheduler.exe
|
||||||
|
|||||||
BIN
Assets/Screenshots/MainScreen_v341.png
Normal file
BIN
Assets/Screenshots/MainScreen_v341.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 406 KiB |
@@ -6,6 +6,7 @@ SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
|
|||||||
CoordMode, ToolTip, Screen
|
CoordMode, ToolTip, Screen
|
||||||
CoordMode, Mouse, Screen
|
CoordMode, Mouse, Screen
|
||||||
FileEncoding, UTF-8-RAW ; Needed for special symbols that are used in video descritions
|
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.
|
; Only Set tool tray icon if this is the source .ahk script.
|
||||||
; The .exe has the icon compiled into it
|
; The .exe has the icon compiled into it
|
||||||
@@ -15,7 +16,13 @@ if(InStr(A_ScriptFullPath, ".ahk")){
|
|||||||
|
|
||||||
; Parameter passed in to script
|
; 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
|
; Customize the Toolbar Icon Menu
|
||||||
@@ -46,14 +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\StdOutToVar.ahk
|
||||||
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.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\URLDownloadToVar.ahk
|
||||||
#Include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk ; Misc functions for video uploading specifically
|
#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 Variables---
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
global ScriptNameav
|
|
||||||
global ScriptVersion
|
|
||||||
global FullScriptName
|
|
||||||
global LBRYResolveAPICommand
|
global LBRYResolveAPICommand
|
||||||
global LBRYPermanentURL
|
global LBRYPermanentURL
|
||||||
global VideoTitle
|
global VideoTitle
|
||||||
@@ -61,7 +67,6 @@ global VideoFilepath
|
|||||||
global VideoThumbFilepath
|
global VideoThumbFilepath
|
||||||
global VideoTags
|
global VideoTags
|
||||||
global VideoDescription
|
global VideoDescription
|
||||||
global SocialMediaDescription
|
|
||||||
global DiscordErrorLoggingWebhookBotURL
|
global DiscordErrorLoggingWebhookBotURL
|
||||||
global DiscordVideosWebhookURL
|
global DiscordVideosWebhookURL
|
||||||
global VideoFolderDir
|
global VideoFolderDir
|
||||||
@@ -71,7 +76,6 @@ global CurrentSite
|
|||||||
global Driver
|
global Driver
|
||||||
global DriverStatus
|
global DriverStatus
|
||||||
global ChromeProfile
|
global ChromeProfile
|
||||||
global ShowTooltipProgressCheckStatus
|
|
||||||
global ShowTooltipProgress
|
global ShowTooltipProgress
|
||||||
global ErrorLogSummary
|
global ErrorLogSummary
|
||||||
global DiscordParlerWebhookURL
|
global DiscordParlerWebhookURL
|
||||||
@@ -112,20 +116,25 @@ SettingsIniFilepath := A_ScriptDir . "\Settings.ini"
|
|||||||
global ScriptSettingsSection
|
global ScriptSettingsSection
|
||||||
ScriptSettingsSection := "VideoUploader"
|
ScriptSettingsSection := "VideoUploader"
|
||||||
|
|
||||||
|
global ScriptNameAcronym
|
||||||
|
ScriptNameAcronym := "FVU"
|
||||||
|
|
||||||
FileInstall, Version.ini, %A_ScriptDir%\Lib\Version.ini, 1
|
global ScriptName
|
||||||
IniRead, ScriptVersion, %A_ScriptDir%\Lib\Version.ini,Video-Uploader, Version, 0.0
|
global ScriptVersion
|
||||||
IniRead, ScriptName, %A_ScriptDir%\Lib\Version.ini,Video-Uploader, Name, "Video Uploader"
|
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
|
FullScriptName := ScriptName . " - " . ScriptVersion
|
||||||
|
|
||||||
|
|
||||||
;---Script Settings---
|
;---Script Settings---
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
; Checkbox Settings
|
; Checkbox Settings
|
||||||
IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgress, 1
|
|
||||||
(ShowTooltipProgress)?(ShowTooltipProgressCheckStatus := 1) : (ShowTooltipProgressCheckStatus := 0)
|
|
||||||
|
|
||||||
IniRead, XPosition, %SettingsIniFilepath%, General, XPosition, 0
|
IniRead, XPosition, %SettingsIniFilepath%, General, XPosition, 0
|
||||||
IniRead, YPosition, %SettingsIniFilepath%, General, YPosition, 0
|
IniRead, YPosition, %SettingsIniFilepath%, General, YPosition, 0
|
||||||
|
|
||||||
@@ -136,22 +145,26 @@ IniRead, DevMode, %SettingsIniFilepath%, General, DevMode, 0
|
|||||||
IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, 0
|
IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, 0
|
||||||
IniRead, MouseClicksSaved, %SettingsIniFilepath%, General, MouseClicksSaved, 0
|
IniRead, MouseClicksSaved, %SettingsIniFilepath%, General, MouseClicksSaved, 0
|
||||||
|
|
||||||
; Checkbox Settings
|
|
||||||
IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgress, 1
|
IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgress, 1
|
||||||
(ShowTooltipProgress)?(ShowTooltipProgressCheckStatus := 1) : (ShowTooltipProgressCheckStatus := 0)
|
|
||||||
|
|
||||||
|
|
||||||
IniRead, AutoUpdateCheck, %SettingsIniFilepath%, General, AutoUpdateCheck, 1
|
IniRead, AutoUpdateCheck, %SettingsIniFilepath%, General, AutoUpdateCheck, 1
|
||||||
(AutoUpdateCheck)?(AutoUpdateCheckCheckStatus := 1) : (AutoUpdateCheckCheckStatus := 0)
|
|
||||||
|
|
||||||
; AutoLogin setting
|
; AutoLogin setting
|
||||||
IniRead, AutoLogin, %SettingsIniFilepath%, General, AutoLogin, 1
|
IniRead, AutoLogin, %SettingsIniFilepath%, General, AutoLogin, 1
|
||||||
(AutoUpdateCheck)?(AutoUpdateCheckCheckStatus := 1) : (AutoUpdateCheckCheckStatus := 0)
|
|
||||||
|
|
||||||
IniRead, PingOnCompletion, %SettingsIniFilepath%, General, PingOnCompletion, 1
|
IniRead, KillLBRYAfterUpload, %SettingsIniFilepath%, General, KillLBRYAfterUpload, 1
|
||||||
(PingOnCompletion)?(PingOnCompletionCheckStatus := 1) : (PingOnCompletionCheckStatus := 0)
|
|
||||||
|
|
||||||
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%
|
IniRead, DiscordUsernameID, %SettingsIniFilepath%, General, DiscordUsernameID, %A_space%
|
||||||
if(!DiscordUsernameID){
|
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"
|
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"
|
||||||
@@ -160,10 +173,6 @@ if(PingOnCompletion){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IniRead, KillLBRYAfterUpload, %SettingsIniFilepath%, General, KillLBRYAfterUpload, 1
|
|
||||||
(KillLBRYAfterUpload)?(=KillLBRYAfterUploadCheckStatus := 1) : (KillLBRYAfterUploadCheckStatus := 0)
|
|
||||||
|
|
||||||
IniRead, DiscordErrorLoggingWebhookBotURL, %SettingsIniFilepath%, General, DiscordWebhookBotURL, %A_space%
|
IniRead, DiscordErrorLoggingWebhookBotURL, %SettingsIniFilepath%, General, DiscordWebhookBotURL, %A_space%
|
||||||
if(DiscordErrorLoggingWebhookBotURL = ""){
|
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=
|
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=
|
||||||
@@ -171,20 +180,26 @@ if(DiscordErrorLoggingWebhookBotURL = ""){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; Auto Updater Settings
|
||||||
;---Auto Updater Settings---
|
; ------------------------------------------------
|
||||||
;------------------------------------------------
|
|
||||||
global GitReleasesAPIURL
|
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---
|
;---LBRY Settings---
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
IniRead, LBRYNewVideoStakeAmount, %SettingsIniFilepath%, General, LBRYNewVideoStakeAmount, %A_Space%
|
IniRead, LBRYNewVideoStakeAmount, %SettingsIniFilepath%, General, LBRYNewVideoStakeAmount, 1.0
|
||||||
if(LBRYNewVideoStakeAmount = ""){
|
|
||||||
LBRYNewVideoStakeAmount = 1.0
|
|
||||||
IniWrite, %LBRYNewVideoStakeAmount%, %SettingsIniFilepath%, General, LBRYNewVideoStakeAmount
|
|
||||||
}
|
|
||||||
|
|
||||||
IniRead, LBRYChannelID, %SettingsIniFilepath%, General, LBRYChannelID, %A_Space%
|
IniRead, LBRYChannelID, %SettingsIniFilepath%, General, LBRYChannelID, %A_Space%
|
||||||
if(LBRYChannelID = ""){
|
if(LBRYChannelID = ""){
|
||||||
@@ -193,12 +208,10 @@ if(LBRYChannelID = ""){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; Set Settings based on Passed in Arguments
|
||||||
;---Read Info From Project Files---
|
; ------------------------------------------------
|
||||||
;------------------------------------------------
|
; 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")){
|
||||||
; 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")){
|
|
||||||
|
|
||||||
; create backups folder if it doesn't exist
|
; create backups folder if it doesn't exist
|
||||||
BackupsFolder = %LibFolder%\Backups\
|
BackupsFolder = %LibFolder%\Backups\
|
||||||
@@ -209,44 +222,51 @@ if(InStr(PassedParameter,ScriptName) and InStr(PassedParameter,".exe")){
|
|||||||
}
|
}
|
||||||
|
|
||||||
; move old version to backups folder, overwrite if name conflict
|
; 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
|
if(ErrorLevel){ ; most likely because the old version hasn't finished exiting yet
|
||||||
SaveOrPostProgress(Message:="Moving Old Version to Backups",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar")
|
SaveOrPostProgress(Message:="Moving Old Version to Backups",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar")
|
||||||
sleep, 2000
|
sleep, 2000
|
||||||
FileMove, %PassedParameter%, %BackupsFolder%\*, 1
|
FileDelete, %PassedInArgument1_Filepath%
|
||||||
if(ErrorLevel){
|
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
|
ToolTip
|
||||||
}
|
}
|
||||||
; Change paramter to LastPost so last post gets automatically opened instead of user having to re-select the file again
|
; Change parameter to "LastPost" so last post now gets automatically opened instead of user having to re-select the file again
|
||||||
PassedParameter = LastPost
|
PassedInArgument1_Filepath = LastPost
|
||||||
}
|
}
|
||||||
|
|
||||||
if(PassedParameter = "LastPost"){
|
if(PassedInArgument1_Filepath = "LastPost"){
|
||||||
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
IniRead, PassedInArgument1_Filepath, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
||||||
}
|
}
|
||||||
|
|
||||||
if(PassedParameter = "ShowResults"){
|
if(PassedInArgument2_Action = "ShowResults"){
|
||||||
IniRead, PassedParameter, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
IniRead, PassedInArgument1_Filepath, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost, %A_Space%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; Show File Selection Dialogue
|
||||||
PassedParameterLength := StrLen(PassedParameter)
|
; ------------------------------------------------
|
||||||
if(PassedParameterLength < 5 and !InStr(PassedParameter, ".exe")){
|
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
|
FileSelectFile, BodyTextFilePath,,%RootDirToStartIn%,Please Select ANY File Within the Project Folder
|
||||||
if(ErrorLevel)
|
if(ErrorLevel)
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
else, {
|
else, {
|
||||||
SkipUpdateCheckThisRun := 1
|
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
|
SplitPath, BodyTextFilePath, OutFileName, VideoFolderDir, OutExtension, OutNameNoExt, OutDrive
|
||||||
|
|
||||||
Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the directory
|
Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the directory
|
||||||
@@ -255,9 +275,12 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
|||||||
|
|
||||||
if(FileNameWExt = "title.txt"){
|
if(FileNameWExt = "title.txt"){
|
||||||
FileRead, VideoTitle, %A_LoopFileFullPath%
|
FileRead, VideoTitle, %A_LoopFileFullPath%
|
||||||
|
|
||||||
|
; Generate the LBRY URL Slug on each startup in case Title changes between runs
|
||||||
LBRYURLSlug := VideoTitle
|
LBRYURLSlug := VideoTitle
|
||||||
|
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
||||||
|
|
||||||
OriginalVideoTitle := VideoTitle
|
OriginalVideoTitle := VideoTitle
|
||||||
OriginalLBRYURLSlug := LBRYURLSlug
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FileNameWExt = "body.txt"){
|
if(FileNameWExt = "body.txt"){
|
||||||
@@ -276,7 +299,7 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
|||||||
FileRead, VideoTags, %A_LoopFileFullPath%
|
FileRead, VideoTags, %A_LoopFileFullPath%
|
||||||
FileRead, PodcastTags, %A_LoopFileFullPath%
|
FileRead, PodcastTags, %A_LoopFileFullPath%
|
||||||
OriginalVideoTags := VideoTags
|
OriginalVideoTags := VideoTags
|
||||||
OriginalPodcastTags := PodcastTags
|
OriginalPodcastTags := PodcastTags ; set in case there is no keywords_podcast file
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FileNameWExt = "keywords_podcast.txt"){
|
if(FileNameWExt = "keywords_podcast.txt"){
|
||||||
@@ -290,8 +313,14 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
|||||||
FileGetSize, VideoFileSizeInMB, %A_LoopFileFullPath%, M
|
FileGetSize, VideoFileSizeInMB, %A_LoopFileFullPath%, M
|
||||||
|
|
||||||
VideoInfoObj := Filexpro(VideoFilepath,
|
VideoInfoObj := Filexpro(VideoFilepath,
|
||||||
, "System.Video.TotalBitrate" )
|
, "System.Video.TotalBitrate"
|
||||||
VideoTotalBitrate := VideoInfoObj["System.Video.TotalBitrate"]
|
, "System.Video.FrameHeight"
|
||||||
|
, "System.Video.FrameWidth" )
|
||||||
|
try, VideoTotalBitrate := VideoInfoObj["System.Video.TotalBitrate"]
|
||||||
|
try, VideoHeight := VideoInfoObj["System.Video.FrameHeight"]
|
||||||
|
try, VideoWidth := VideoInfoObj["System.Video.FrameWidth"]
|
||||||
|
|
||||||
|
VideoAspectRatio := getAspectRatio(VideoWidth, VideoHeight)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,11 +329,6 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 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
|
Loop, files, %VideoFolderDir%\*.flac, F ; loop through the files in the directory
|
||||||
{ ; D = Directories, F = Files, R = Recursive
|
{ ; D = Directories, F = Files, R = Recursive
|
||||||
@@ -350,10 +374,9 @@ if(FileExist(VideoLinksIniFile)){
|
|||||||
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
||||||
|
|
||||||
; LBRY
|
; LBRY
|
||||||
IniRead, LBRYURLSlug, %VideoLinksIniFile%, Misc, LBRYURLSlug, %A_Space%
|
; removed on 2024/06/24, let's regenerate the slug each time in case the video file changes between runs
|
||||||
if(LBRYURLSlug = ""){
|
; IniRead, LBRYURLSlug, %VideoLinksIniFile%, Misc, LBRYURLSlug, %A_Space%
|
||||||
LBRYURLSlug := OriginalLBRYURLSlug ; video title
|
|
||||||
}
|
|
||||||
; LBRY Video
|
; LBRY Video
|
||||||
IniRead, LBRYVideoURL, %VideoLinksIniFile%, URLs, LBRYVideoURL, %A_Space%
|
IniRead, LBRYVideoURL, %VideoLinksIniFile%, URLs, LBRYVideoURL, %A_Space%
|
||||||
IniRead, LBRYVideoThumb, %VideoLinksIniFile%, Misc, LBRYVideoThumb, %A_Space%
|
IniRead, LBRYVideoThumb, %VideoLinksIniFile%, Misc, LBRYVideoThumb, %A_Space%
|
||||||
@@ -382,26 +405,25 @@ if(FileExist(VideoLinksIniFile)){
|
|||||||
|
|
||||||
; MISC
|
; MISC
|
||||||
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
||||||
IniRead, TempVideoThumbFilepath, %VideoLinksIniFile%, Misc, VideoThumbFilepath, %A_Space%
|
|
||||||
if(TempVideoThumbFilepath){ ; if Video Thumbnail was saved in last run, overwrite variable path that was grabbed in the file loop above
|
; I don't remember why I added this, commenting this out on 2024/06/22 for now
|
||||||
|
; IniRead, TempVideoThumbFilepath, %VideoLinksIniFile%, Misc, VideoThumbFilepath, %A_Space%
|
||||||
|
/* if(TempVideoThumbFilepath){ ; if Video Thumbnail was saved in last run, overwrite variable path that was grabbed in the file loop above
|
||||||
VideoThumbFilepath := TempVideoThumbFilepath
|
VideoThumbFilepath := TempVideoThumbFilepath
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if(VideoFileSizeInMB < 50){
|
|
||||||
IniRead, Telegram, %VideoLinksIniFile%, Misc, Telegram, %A_Space%
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; Create a directory for errorlogging if this is the first time working on this project
|
; Create a directory for errorlogging if this is the first time working on this project
|
||||||
if(ErrorLoggingFilePath = ""){
|
if(ErrorLoggingFilePath = ""){
|
||||||
; DevModeMsgBox("generating filepath")
|
|
||||||
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
||||||
ErrorLoggingDirectory := ErrorLoggingFolder . "\" . TodayDate . "_FVU"
|
ErrorLoggingDirectory := ErrorLoggingFolder . "\" . TodayDate . "_" . ScriptNameAcronym
|
||||||
FileCreateDir, %ErrorLoggingDirectory%
|
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
|
IniWrite, %ErrorLoggingFilePath%, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,113 +432,72 @@ if(PodcastNumber = ""){
|
|||||||
PodcastNumber := PodcastNumber[2]
|
PodcastNumber := PodcastNumber[2]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Set Websites to Upload to
|
||||||
|
; ------------------------------------------------
|
||||||
; Set the checkmark status of each item based on the variable status
|
; Set the checkmark status of each item based on the variable status
|
||||||
; (StreamanityURL != "")?(StreamanityCheckStatus := 0) : (StreamanityCheckStatus := 1)
|
(BitChuteURL)?(BitChute := 0) : (BitChute := 1)
|
||||||
(BitChuteURL != "")?(BitChuteCheckStatus := 0) : (BitChuteCheckStatus := 1)
|
(RumbleURL)?(Rumble := 0) : (Rumble := 1)
|
||||||
|
(DailyMotionURL)?(DailyMotion := 0) : (DailyMotion := 1)
|
||||||
|
|
||||||
(OdyseeVideoURL != "")?(OdyseeVideoCheckStatus := 0) : (OdyseeVideoCheckStatus := 1)
|
; if user tried to upload to locals already and still needs to grab the url
|
||||||
(OdyseeVideoThumb != "")?(OdyseeVideoThumbCheckStatus := 0) : (OdyseeVideoThumbCheckStatus := 0)
|
if(LocalsURL = "" OR LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
||||||
OdyseeAudioThumbCheckStatus := 0
|
Locals := 1
|
||||||
if(OdyseeAudioURL OR WavAudioFilepath = "")
|
}
|
||||||
OdyseeAudioCheckStatus := 0
|
else,
|
||||||
/*
|
Locals := 0
|
||||||
if(OdyseeAudioThumb OR WavAudioFilepath = "")
|
|
||||||
OdyseeAudioThumbCheckStatus := 0
|
|
||||||
|
|
||||||
*/
|
(OdyseeVideoURL)?(OdyseeVideo := 0) : (OdyseeVideo := 1)
|
||||||
(RumbleURL != "")?(RumbleCheckStatus := 0) : (RumbleCheckStatus := 1)
|
(OdyseeAudioURL || WavAudioFilepath = "")?(OdyseeAudio := 0) : (OdyseeAudio := 1)
|
||||||
; if user tried to upload to locals already and still needs to grab the url, check
|
|
||||||
(LocalsURL = "LocalsUploadStartedNeedToGrabURL")?(LocalsCheckStatus := 1) : (LocalsCheckStatus := 0)
|
; Brighteon has 6GB video file size limit
|
||||||
(BrighteonURL != "")?(BrighteonCheckStatus := 0) : (BrighteonCheckStatus := 1)
|
(BrighteonURL)?(Brighteon := 0) : (Brighteon := 1)
|
||||||
if(VideoFileSizeInMB > 6144){
|
if(VideoFileSizeInMB > 6144){
|
||||||
VideoFileSizeOver6GB := 1
|
VideoFileSizeOver6GB := 1
|
||||||
BrighteonCheckStatus := 0
|
Brighteon := 0
|
||||||
}
|
}
|
||||||
|
|
||||||
(DailyMotionURL != "")?(DailyMotionCheckStatus := 0) : (DailyMotionCheckStatus := 1)
|
; Brighteon will fail if video does not have one of the following aspect ratios
|
||||||
FacebookCheckStatus := 0
|
BrighteonAcceptedAspectRatios := ["4:3","3:4","16:9","9:16"]
|
||||||
TelegramCheckStatus := 0
|
; Msgbox % "VideoAspectRatio: " VideoAspectRatio
|
||||||
|
VideoHasBrighteonCompatibleAspectRatio := HasVal(BrighteonAcceptedAspectRatios, VideoAspectRatio)
|
||||||
|
|
||||||
|
|
||||||
|
; Override Website statuses if this is a schedule post based on Argument3
|
||||||
|
; ------------------------------------------------
|
||||||
|
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)
|
||||||
|
|
||||||
|
; }
|
||||||
|
goto, StartScheduledPost
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
|
||||||
;---/Read Info From Previous Run And Set Upload Options---
|
;---/Read Info From Previous Run And Set Upload Options---
|
||||||
;--------------------------------------------------------
|
;--------------------------------------------------------
|
||||||
|
|
||||||
|
if(PassedInArgument2_Action = "ShowResults"){
|
||||||
|
|
||||||
;---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)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(PassedParameter = "ShowResults"){
|
|
||||||
goto, DisplayResults
|
goto, DisplayResults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Main GUI Window
|
; Main GUI Window
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
#include %A_scriptDir%\Modules\GUI-Main-Window.ahk
|
|
||||||
|
|
||||||
|
|
||||||
; Write current project to ini file for easy reloading
|
; Write current project to ini file for easy reloading
|
||||||
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
IniWrite, %BodyTextFilePath%, %SettingsIniFilepath%, %ScriptSettingsSection%, LastPost
|
||||||
|
|
||||||
|
gosub, SetAndShowMainGUI
|
||||||
|
|
||||||
URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
RunTimeToShowGui := 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
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
; calculate run time and convert to seconds
|
|
||||||
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
|
||||||
|
|
||||||
Return
|
Return
|
||||||
|
|
||||||
@@ -557,16 +538,17 @@ Return
|
|||||||
|
|
||||||
; Open folder of the project
|
; Open folder of the project
|
||||||
OpenProjectFolder:
|
OpenProjectFolder:
|
||||||
|
if(FileExist(VideoFolderDir))
|
||||||
run, %VideoFolderDir%
|
run, %VideoFolderDir%
|
||||||
|
else,
|
||||||
|
msgbox, Cannot Open Folder as it no longer exists at:`n%VideoFolderDir%
|
||||||
Return
|
Return
|
||||||
|
|
||||||
ClearVideoLinks:
|
ClearVideoLinks:
|
||||||
FileDelete, %VideoLinksIniFile%
|
FileDelete, %VideoLinksIniFile%
|
||||||
Return
|
Return
|
||||||
|
|
||||||
OpenErrorLog:
|
|
||||||
run, %ErrorLoggingFilePath%
|
|
||||||
Return
|
|
||||||
|
|
||||||
ToggleTestingMode:
|
ToggleTestingMode:
|
||||||
ToggleTestingMode()
|
ToggleTestingMode()
|
||||||
@@ -578,11 +560,28 @@ ToggleDevMode()
|
|||||||
run, "%A_ScriptFullPath%" "LastPost"
|
run, "%A_ScriptFullPath%" "LastPost"
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
/*
|
||||||
OpenGiteaPage:
|
OpenGiteaPage:
|
||||||
run, https://freedomain.dev/yuriy/video-uploader
|
run, https://freedomain.dev/yuriy/video-uploader
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
OpenErrorLog:
|
||||||
|
run, %ErrorLoggingFilePath%
|
||||||
|
Return
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
UncheckAllPlatforms:
|
||||||
|
GuiControl,,Bitchute, 0
|
||||||
|
GuiControl,,Locals, 0
|
||||||
|
GuiControl,,OdyseeVideo, 0
|
||||||
|
GuiControl,,OdyseeAudio, 0
|
||||||
|
GuiControl,,Rumble, 0
|
||||||
|
GuiControl,,DailyMotion, 0
|
||||||
|
GuiControl,,Brighteon, 0
|
||||||
|
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SelectVideoFilepath:
|
SelectVideoFilepath:
|
||||||
@@ -631,78 +630,26 @@ UpdateScript()
|
|||||||
; @todo: Save any changes made to the script before installing update
|
; @todo: Save any changes made to the script before installing update
|
||||||
Return
|
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:
|
|
||||||
|
|
||||||
SocialMediaDescription := StrSplit(VideoDescription, SplitText)
|
|
||||||
SocialMediaDescription := SocialMediaDescription[1]
|
|
||||||
|
|
||||||
if(strlen(SocialMediaDescription) > 1400){
|
|
||||||
SocialMediaDescription := SubStr(SocialMediaDescription, 1, 1400)
|
|
||||||
SocialMediaDescription .= "..."
|
|
||||||
}
|
|
||||||
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
; -------------------------------Upload Video Functionality-------------------------------
|
; -------------------------------Upload Video Functionality-------------------------------
|
||||||
StartScript:
|
StartScript:
|
||||||
WinGetPos, XPosition, YPosition, , , A
|
WinGetPos, XPosition, YPosition, , , A
|
||||||
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
IniWrite, %XPosition%, %SettingsIniFilepath%, General, XPosition
|
||||||
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
|
||||||
|
|
||||||
Gui, Submit
|
Gui, Submit, NoHide
|
||||||
Gui, Destroy
|
|
||||||
|
|
||||||
|
if(VideoFilepath = ""){
|
||||||
|
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
||||||
|
Return
|
||||||
; 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Destroy GUI after checking everything is working
|
||||||
|
Gui, Destroy
|
||||||
|
|
||||||
; Save Video Info
|
; Save Video Info
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
; if changes made, delete the original file and save the new content to it
|
; if changes made, delete the original file and save the new content to it
|
||||||
@@ -738,22 +685,21 @@ if(VideoDescription != OriginalVideoDescription){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; Save Script Settings to File
|
||||||
; -------------------------------/Save Video Info-------------------------------
|
; ------------------------------------------------
|
||||||
|
|
||||||
; Save settings to config file
|
; Save settings to config file
|
||||||
IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, General, ShowTooltipProgress
|
IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, General, ShowTooltipProgress
|
||||||
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, General, AutoUpdateCheck
|
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, General, AutoUpdateCheck
|
||||||
IniWrite, %AutoLogin%, %SettingsIniFilepath%, General, AutoLogin
|
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, %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 = ""){
|
StartScheduledPost:
|
||||||
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
|
|
||||||
run, "%A_ScriptFullPath%" "LastPost"
|
|
||||||
ExitApp
|
|
||||||
}
|
|
||||||
|
|
||||||
; Format the LBRYURLSlug to be API Compatible
|
; Format the LBRYURLSlug to be API Compatible
|
||||||
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
|
if(LBRYURLSlug = "") ; if slug spot is blank, then set it to video title
|
||||||
@@ -761,25 +707,22 @@ LBRYURLSlug := VideoTitle
|
|||||||
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
LBRYURLSlug := LBRYCMDTextReplacement(LBRYURLSlug)
|
||||||
|
|
||||||
; Save the LBRY URL Slug to .ini file in case it's needed later
|
; Save the LBRY URL Slug to .ini file in case it's needed later
|
||||||
IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
; removed on 2024/06/24, generating the URL SLugh each run going forward
|
||||||
|
; IniWrite, %LBRYURLSlug%, %VideoLinksIniFile%, Misc, LBRYUrlSlug
|
||||||
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, Misc, PodcastNumber
|
||||||
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
IniWrite, %VideoThumbFilepath%, %VideoLinksIniFile%, Misc, VideoThumbFilepath
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------Log Info To Text-------------------------------
|
; -------------------------------Log Info To Text-------------------------------s
|
||||||
|
(Bitchute)?(PostedWebsites .= "Bitchute|") : ()
|
||||||
(Facebook = 1)?(PostedWebsites .= "Facebook|") : ()
|
(Locals)?(PostedWebsites .= "Locals|") : ()
|
||||||
(Bitchute = 1)?(PostedWebsites .= "Bitchute|") : ()
|
(Rumble)?(PostedWebsites .= "Rumble|") : ()
|
||||||
(Locals = 1)?(PostedWebsites .= "Locals|") : ()
|
(Brighteon)?(PostedWebsites .= "Brighteon|") : ()
|
||||||
(Rumble = 1)?(PostedWebsites .= "Rumble|") : ()
|
(DailyMotion)?(PostedWebsites .= "DailyMotion|") : ()
|
||||||
(Brighteon = 1)?(PostedWebsites .= "Brighteon|") : ()
|
(OdyseeVideo)?(PostedWebsites .= "OdyseeVideo|") : ()
|
||||||
; (Streamanity = 1)?(PostedWebsites .= "Streamanity|") : ()
|
(OdyseeAudio)?(PostedWebsites .= "OdyseeAudio|") : ()
|
||||||
(Telegram = 1)?(PostedWebsites .= "Telegram|") : ()
|
|
||||||
(DailyMotion = 1)?(PostedWebsites .= "DailyMotion|") : ()
|
|
||||||
(OdyseeVideo = 1)?(PostedWebsites .= "OdyseeVideo|") : ()
|
|
||||||
(OdyseeAudio = 1)?(PostedWebsites .= "OdyseeAudio|") : ()
|
|
||||||
|
|
||||||
|
|
||||||
; Log Basic info to the errorlogging file
|
; Log Basic info to the errorlogging file
|
||||||
@@ -804,11 +747,17 @@ SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
|||||||
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
Message := "TotalVideosUploaded: " TotalVideosUploaded
|
||||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
Message := "Video Information:`n VideoTotalBitrate:" . VideoTotalBitrate . "`nVideoAspectRatio:" . VideoAspectRatio
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
; Convert Video Title and Description into javascript formatting for sending to pages through js instead of plain selenium
|
; Convert Video Title and Description into javascript formatting for sending to pages through js instead of plain selenium
|
||||||
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
JSVideoTitle := FormatTextToJSText(VideoTitle)
|
||||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
||||||
|
|
||||||
|
Message = JSVideoSummary:`n %JSVideoSummary%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
; -------------------------------/Log Info To Text-------------------------------
|
; -------------------------------/Log Info To Text-------------------------------
|
||||||
|
|
||||||
|
|
||||||
@@ -898,13 +847,10 @@ if(OdyseeAudio){
|
|||||||
if(LocalsGrabURL){
|
if(LocalsGrabURL){
|
||||||
Gosub, LocalsGrabURL
|
Gosub, LocalsGrabURL
|
||||||
}
|
}
|
||||||
|
|
||||||
; // Upload to Sites
|
; // Upload to Sites
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
|
if(URLOfLastErrorPage){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(URLOfLastErrorPage != ""){
|
|
||||||
Message = Activating Tab of last failed post.
|
Message = Activating Tab of last failed post.
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||||
|
|
||||||
@@ -920,7 +866,7 @@ else,
|
|||||||
Message = All Videos Uploaded Successfully
|
Message = All Videos Uploaded Successfully
|
||||||
|
|
||||||
|
|
||||||
if(PingOnCompletion)
|
if(DiscordPingOnCompletion)
|
||||||
Message = <@%DiscordUsernameID%>: %Message%
|
Message = <@%DiscordUsernameID%>: %Message%
|
||||||
else,
|
else,
|
||||||
Message = %Message%
|
Message = %Message%
|
||||||
@@ -939,7 +885,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, MouseClicksSaved, %SettingsIniFilepath%, General, MouseClicksSaved, %A_Space%
|
||||||
IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, %A_Space%
|
IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, %A_Space%
|
||||||
; IniRead, StreamanityURL, %VideoLinksIniFile%, URLs, StreamanityURL, %A_Space%
|
|
||||||
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
||||||
|
|
||||||
IniRead, OdyseeVideoURL, %VideoLinksIniFile%, URLs, OdyseeVideoURL, %A_Space%
|
IniRead, OdyseeVideoURL, %VideoLinksIniFile%, URLs, OdyseeVideoURL, %A_Space%
|
||||||
@@ -954,7 +899,6 @@ OdyseeAudioThumb := StrReplace(OdyseeAudioThumb, "Thumb:", "")
|
|||||||
|
|
||||||
IniRead, LocalsURL, %VideoLinksIniFile%, URLs, LocalsURL, %A_Space%
|
IniRead, LocalsURL, %VideoLinksIniFile%, URLs, LocalsURL, %A_Space%
|
||||||
IniRead, RumbleURL, %VideoLinksIniFile%, URLs, RumbleURL, %A_Space%
|
IniRead, RumbleURL, %VideoLinksIniFile%, URLs, RumbleURL, %A_Space%
|
||||||
IniRead, FacebookURL, %VideoLinksIniFile%, URLs, FacebookURL, %A_Space%
|
|
||||||
IniRead, BrighteonURL, %VideoLinksIniFile%, URLs, BrighteonURL, %A_Space%
|
IniRead, BrighteonURL, %VideoLinksIniFile%, URLs, BrighteonURL, %A_Space%
|
||||||
IniRead, DailyMotionURL, %VideoLinksIniFile%, URLs, DailyMotionURL, %A_Space%
|
IniRead, DailyMotionURL, %VideoLinksIniFile%, URLs, DailyMotionURL, %A_Space%
|
||||||
IniRead, PodcastNumber, %VideoLinksIniFile%, Misc, PodcastNumber, %A_Space%
|
IniRead, PodcastNumber, %VideoLinksIniFile%, Misc, PodcastNumber, %A_Space%
|
||||||
@@ -977,12 +921,58 @@ if(PodcastNumber = "") {
|
|||||||
|
|
||||||
; Show Results GUI Window
|
; Show Results GUI Window
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
#include %A_scriptDir%\Modules\GUI-Results-Window.ahk
|
|
||||||
|
gosub, SetGUIVariables
|
||||||
|
gosub, SetAndShowResultsGUI
|
||||||
|
|
||||||
SaveCurrentChromeVersionToIniFile()
|
SaveCurrentChromeVersionToIniFile()
|
||||||
|
|
||||||
Return
|
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:
|
OpenLBRYBlobFilesFolder:
|
||||||
try,
|
try,
|
||||||
run, C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\blobfiles
|
run, C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\blobfiles
|
||||||
@@ -995,7 +985,7 @@ StartSocialMediaPoster:
|
|||||||
; IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, General, FDRRadioUN, %A_Space%
|
; IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, General, FDRRadioUN, %A_Space%
|
||||||
IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath, %A_Space%
|
IniRead, SocialMediaPosterFilepath, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath, %A_Space%
|
||||||
|
|
||||||
if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
if(!SocialMediaPosterFilepath or !FileExist(SocialMediaPosterFilepath)){
|
||||||
OnMessage(0x44, "OnMsgBoxSocialMediaPoster")
|
OnMessage(0x44, "OnMsgBoxSocialMediaPoster")
|
||||||
MsgBox 0x21, Filepath Not Found, Unable to find filepath for Social Media Poster`nWould you like to add it?
|
MsgBox 0x21, Filepath Not Found, Unable to find filepath for Social Media Poster`nWould you like to add it?
|
||||||
OnMessage(0x44, "")
|
OnMessage(0x44, "")
|
||||||
@@ -1012,7 +1002,7 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, SocialMediaPoster, SocialMediaPosterFilepath
|
IniWrite, %SocialMediaPosterFilepath%, %SettingsIniFilepath%, Filepaths, SocialMediaPosterFilepath
|
||||||
|
|
||||||
}
|
}
|
||||||
run, %SocialMediaPosterFilepath% "%VideoLinksIniFile%"
|
run, %SocialMediaPosterFilepath% "%VideoLinksIniFile%"
|
||||||
@@ -1024,88 +1014,30 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
|||||||
|
|
||||||
; Copy Info from GUI to Clipboard
|
; Copy Info from GUI to Clipboard
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
; @todo: this can be converted into 1 gosub, with if/else statements based on the button clicked
|
CopyToClipboard:
|
||||||
|
|
||||||
|
Message = Copying %A_GuiControl% to Clipboard
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||||
|
|
||||||
|
(A_GuiControl = "Transcript URL")?(Clipboard := PodcastTranscriptURL):()
|
||||||
|
(A_GuiControl = "Bitchute")?(Clipboard := BitChuteURL):()
|
||||||
|
(A_GuiControl = "Brighteon")?(Clipboard := BrighteonURL):()
|
||||||
|
(A_GuiControl = "DailyMotion")?(Clipboard := DailyMotionURL):()
|
||||||
|
(A_GuiControl = "Odysee Video")?(Clipboard := OdyseeVideoURL):()
|
||||||
|
(A_GuiControl = "Odysee Audio")?(Clipboard := OdyseeAudioURL):()
|
||||||
|
(A_GuiControl = "Rumble")?(Clipboard := RumbleURL):()
|
||||||
|
(A_GuiControl = "Locals")?(Clipboard := LocalsURL):()
|
||||||
|
(A_GuiControl = "Unauthorized")?(Clipboard := UnauthorizedTVURL):()
|
||||||
|
(A_GuiControl = "Video Tags")?(Clipboard := VideoTags):()
|
||||||
|
(A_GuiControl = "Podcast Tags")?(Clipboard := PodcastTags):()
|
||||||
|
(A_GuiControl = "Description")?(Clipboard := VideoDescription):()
|
||||||
|
(A_GuiControl = "Summary")?(Clipboard := VideoSummary):()
|
||||||
|
|
||||||
CopyPodcastTranscriptURL:
|
|
||||||
Clipboard := PodcastTranscriptURL
|
|
||||||
Message := PodcastTranscriptURL . "`nCopied to Clipboard"
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
sleep, 1000
|
||||||
ToolTip
|
ToolTip
|
||||||
Return
|
Return
|
||||||
|
|
||||||
|
|
||||||
CopyVideoTitle:
|
|
||||||
Clipboard := VideoTitle
|
|
||||||
SaveOrPostProgress(Message:=VideoTitle "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyBitChuteURL:
|
|
||||||
Clipboard := BitChuteURL
|
|
||||||
SaveOrPostProgress(Message:=BitChuteURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyBrighteonURL:
|
|
||||||
Clipboard := BrighteonURL
|
|
||||||
SaveOrPostProgress(Message:=BrighteonURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyDailyMotionURL:
|
|
||||||
Clipboard := DailyMotionURL
|
|
||||||
SaveOrPostProgress(Message:=DailyMotionURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyOdyseeVideoURL:
|
|
||||||
Clipboard := OdyseeVideoURL
|
|
||||||
SaveOrPostProgress(Message:=OdyseeVideoURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyOdyseeAudioURL:
|
|
||||||
Clipboard := OdyseeAudioURL
|
|
||||||
SaveOrPostProgress(Message:=OdyseeAudioURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyRumbleURL:
|
|
||||||
Clipboard := RumbleURL
|
|
||||||
SaveOrPostProgress(Message:=RumbleURL "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
|
|
||||||
CopyVideoTags:
|
|
||||||
Clipboard := VideoTags
|
|
||||||
SaveOrPostProgress(Message:=VideoTags "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyPodcastTags:
|
|
||||||
Clipboard := PodcastTags
|
|
||||||
SaveOrPostProgress(Message:=PodcastTags "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
CopyVideoDescription:
|
|
||||||
Clipboard := VideoDescription
|
|
||||||
SaveOrPostProgress(Message:="Video Description`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
sleep, 1000
|
|
||||||
ToolTip
|
|
||||||
Return
|
|
||||||
|
|
||||||
; @todo: Add thumbnail status to this
|
; @todo: Add thumbnail status to this
|
||||||
; @todo: add podcast tags to this
|
; @todo: add podcast tags to this
|
||||||
UpdateINI:
|
UpdateINI:
|
||||||
@@ -1204,3 +1136,14 @@ Return
|
|||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
#Include %A_ScriptDir%\Modules\Podcast-Upload.ahk
|
#Include %A_ScriptDir%\Modules\Podcast-Upload.ahk
|
||||||
|
|
||||||
|
; Update Functionality
|
||||||
|
; ------------------------------------------------
|
||||||
|
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Shared-GoTos.ahk
|
||||||
|
|
||||||
|
; Special Website Functions
|
||||||
|
; ------------------------------------------------
|
||||||
|
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Locals-Functions.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: f625e782eb...62e8afebb8
@@ -6,13 +6,24 @@ Message = Starting Upload
|
|||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
Status := NavigateFromBaseURLTo("https://www.bitchute.com/myupload", "BitChute Video Uploader")
|
Status := NavigateFromBaseURLTo("https://www.bitchute.com/")
|
||||||
if(Status)
|
if(Status)
|
||||||
Return
|
Return
|
||||||
|
|
||||||
Message = Checking Login Status
|
Message = Checking Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
Xpath = (//div[normalize-space()='Sign in'])[1]
|
||||||
|
try LoginStatus := driver.findelementbyxpath(Xpath).Attribute("innerText")
|
||||||
|
if(LoginStatus = "Sign In"){
|
||||||
|
Message = Logged out. Trying to Log Back In
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
try TabUrl := driver.url
|
try TabUrl := driver.url
|
||||||
if(InStr(TabUrl, "/accounts/login/")){
|
if(InStr(TabUrl, "/accounts/login/")){
|
||||||
if(AutoLogin){
|
if(AutoLogin){
|
||||||
@@ -35,10 +46,33 @@ if(InStr(TabUrl, "/accounts/login/")){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
CheckForAlerts()
|
CheckForAlerts()
|
||||||
|
|
||||||
|
if(BitchuteUploadUploadURL = "")
|
||||||
|
{
|
||||||
|
; click on video upload icon so dropdown menu appears
|
||||||
|
Xpath = (//i[normalize-space()='video_call'])[1]
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
|
; grab upload url from dropdown menu
|
||||||
|
Xpath = (//a[@id='id_upload_video'])[1]
|
||||||
|
UploadURL := GetHTMLValueFromXpathOuterHTML(XPATH, "href")
|
||||||
|
|
||||||
|
if(!InStr(UploadURL, "https")){
|
||||||
|
Message = Failed to Grab Upload Page URL from Home Page
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
|
||||||
|
UploadURL := StrReplace(UploadURL, "api.bitchute", "old.bitchute")
|
||||||
|
}
|
||||||
|
|
||||||
|
try, driver.Get(UploadURL) ;Open selected URL
|
||||||
|
try, driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
|
||||||
|
|
||||||
Message = Inputting Title
|
Message = Inputting Title
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
@@ -130,15 +164,15 @@ Loop, 3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Message = Inputting Tags: %BitchuteTags%
|
Message = Inputting Tags: %BitchuteTags%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
; input Search Terms (Tags)
|
; input Search Terms (Tags)
|
||||||
Xpath = //input[@placeholder='Search Terms']
|
Xpath = //input[@placeholder='Search Terms']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitchuteTags)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=BitchuteTags)
|
||||||
if(Status){
|
if(Status){
|
||||||
Message = Failed to input search terms (tags)
|
Message = Failed to input search terms (tags)
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
}
|
}
|
||||||
|
|
||||||
js = return document.querySelector("#hashtags").value;
|
js = return document.querySelector("#hashtags").value;
|
||||||
@@ -272,7 +306,6 @@ try driver.executeScript("history.go(0)") ;refresh page
|
|||||||
|
|
||||||
try FirstResultVideoTitle := driver.findElementsByClass("channel-videos-title").item[1].Attribute("innerText") ; Grabb innertext
|
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
|
try FirstResultIDAndTag := driver.findElementsByClass("channel-videos-title").item[1].Attribute("outerHTML") ;XPath: ID=site-title & span tag
|
||||||
; Msgbox % "FirstResultIDAndTag: " FirstResultIDAndTag
|
; Msgbox % "FirstResultIDAndTag: " FirstResultIDAndTag
|
||||||
@@ -287,8 +320,8 @@ if(VideoHref = ""){
|
|||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
BitChuteURL := "https://www.bitchute.com/" . VideoHref
|
BitChuteURL := "https://old.bitchute.com/" . VideoHref
|
||||||
BitChuteURL := StrReplace(BitchuteURL, "//video", "/video")
|
BitChuteURL := StrReplace(BitchuteURL, "//", "/")
|
||||||
|
|
||||||
; navigate to video page
|
; navigate to video page
|
||||||
try driver.Get(BitChuteURL) ;Open selected URL
|
try driver.Get(BitChuteURL) ;Open selected URL
|
||||||
@@ -316,6 +349,9 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,Disc
|
|||||||
Xpath = //button[normalize-space()='Save']
|
Xpath = //button[normalize-space()='Save']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
|
|
||||||
|
BitChuteURL := StrReplace(BitchuteURL, "old.", "")
|
||||||
|
|
||||||
Message = Upload Complete:`n%BitChuteURL%
|
Message = Upload Complete:`n%BitChuteURL%
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
IniWrite, %BitChuteURL%, %VideoLinksIniFile%, URLs, BitChuteURL
|
IniWrite, %BitChuteURL%, %VideoLinksIniFile%, URLs, BitChuteURL
|
||||||
|
|||||||
@@ -63,33 +63,23 @@ if(InStr(CurrentTab, "login")) ; we're logged out
|
|||||||
Message = Trying to Log Back In
|
Message = Trying to Log Back In
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile, DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile, DiscordErrorLogging")
|
||||||
|
|
||||||
; js = return document.querySelector("input[placeholder='username/email']").value;
|
Xpath = //a[normalize-space()='Log In'] ; click login button at top right of page
|
||||||
; status := try driver.executeScript(JS) ;Execute Javascript
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
; sleep, 5000
|
; sleep, 2000
|
||||||
; Msgbox % "status: " status
|
Xpath = //button[@type='submit'] ; click login button on login page
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=6,SleepLength:=1000)
|
||||||
|
try driver.executeScript("return document.readyState").equals("complete")
|
||||||
|
|
||||||
; if(StrLen(Status) > 0){
|
sleep, 2000
|
||||||
; 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)
|
|
||||||
|
|
||||||
; sleep, 2000
|
|
||||||
Xpath = //button[@type='submit'] ; click login button on login page
|
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=6,SleepLength:=1000)
|
|
||||||
try driver.executeScript("return document.readyState").equals("complete")
|
|
||||||
|
|
||||||
sleep, 2000
|
|
||||||
; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else, {
|
|
||||||
SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
|
||||||
SaveDriverURLOFErrorPage()
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else, {
|
||||||
|
SaveOrPostProgress(Message:="Login Expired. Please log back in",PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
SaveDriverURLOFErrorPage()
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -153,7 +143,7 @@ loop, 3 {
|
|||||||
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.SPACE)
|
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.SPACE)
|
||||||
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.BACKSPACE) ;Sends Variable to an Xpath Item
|
try driver.FindElementByXPath(Xpath).SendKeys(driver.Keys.BACKSPACE) ;Sends Variable to an Xpath Item
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
; DailyMotion page automtically splits the tags into individual tags when they're seperated by commas
|
||||||
|
|
||||||
; Iterate from one end of the array to another:
|
; Iterate from one end of the array to another:
|
||||||
Loop % VideoTagsArray.Length(){
|
Loop % ArrayOfVideoTags.Length(){
|
||||||
; ArrayItem := ARRAY[A_Index]
|
; ArrayItem := ARRAY[A_Index]
|
||||||
; MsgBox %
|
; MsgBox %
|
||||||
DailyMotionVideoTags .= VideoTagsArray[A_Index] . ","
|
DailyMotionVideoTags .= ArrayOfVideoTags[A_Index] . ","
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,35 @@
|
|||||||
;---GUI Variables---
|
;---GUI Variables---
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
|
SetGUIVariables:
|
||||||
GuiHeight = 800
|
GuiHeight = 800
|
||||||
GuiWidth = 1366
|
GuiWidth = 1366
|
||||||
GuiFontSize = 10
|
GuiFontSize = 10
|
||||||
|
|
||||||
ButtonHeights := 30
|
ButtonHeights := 30
|
||||||
|
ResultsActionButtonHeights := 50
|
||||||
|
|
||||||
MarginSpace := 10
|
MarginSize := 10
|
||||||
MarginSpaceDoubled := MarginSpace * 2
|
MarginSizeDoubled := MarginSize * 2
|
||||||
MarginSpaceTripled := MarginSpace * 3
|
MarginSizeTripled := MarginSize * 3
|
||||||
|
|
||||||
EditBoxWidths := (GuiWidth / 100) * 60
|
EditBoxWidths := (GuiWidth / 100) * 60
|
||||||
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSpace / 2)
|
EditBoxHalfWidths := (EditBoxWidths / 2) - (MarginSize / 2)
|
||||||
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
|
OdyseeURLSlugEditWidth := (EditBoxHalfWidths / 4) * 3
|
||||||
|
|
||||||
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSpace * 3)
|
PodcastNumberTextXPos := EditBoxHalfWidths + OdyseeURLSlugEditWidth + (MarginSize * 3)
|
||||||
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSpace
|
PodcastNumberEditWidth := (EditBoxHalfWidths / 4) - MarginSize
|
||||||
|
|
||||||
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
|
EditBoxOneFourthWidth := (EditBoxWidths / 4 )
|
||||||
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
|
EditBoxThreeFourthsWidth := (EditBoxWidths / 4 ) * 3
|
||||||
|
|
||||||
|
|
||||||
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSpaceDoubled
|
ColumnOneHalfWidthXPos := EditBoxHalfWidths + MarginSizeDoubled
|
||||||
|
|
||||||
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSpace / 2)
|
EditBoxThirdsWidths := (EditBoxWidths / 3) - (MarginSize / 2)
|
||||||
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
OdyseeURLSlugXPos := EditBoxHalfWidths + (MarginSize * 2)
|
||||||
|
|
||||||
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSpace - 2)
|
EditBoxFourthWidths := (EditBoxWidths / 4) - (MarginSize - 2)
|
||||||
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSpace * 2)
|
VideoTagsTextXPos := EditBoxHalfWidths + (MarginSize * 2)
|
||||||
|
|
||||||
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
|
; EditBoxHalfWidthsWithMargin := (EditBoxWidths / 2)
|
||||||
DescriptionCharCountXPos := EditBoxHalfWidths - 40
|
DescriptionCharCountXPos := EditBoxHalfWidths - 40
|
||||||
@@ -35,22 +37,27 @@ DescriptionCharCountXPos := EditBoxHalfWidths - 40
|
|||||||
PageTwoXStartPos := EditBoxWidths + 50
|
PageTwoXStartPos := EditBoxWidths + 50
|
||||||
|
|
||||||
CopyButtonWidths := 150
|
CopyButtonWidths := 150
|
||||||
ResultEditBoxXPos := CopyButtonWidths + MarginSpace + 5
|
ResultEditBoxXPos := CopyButtonWidths + MarginSize + 5
|
||||||
ResultEditBoxWidths := EditBoxWidths - CopyButtonWidths
|
ResultEditBoxWidth := EditBoxWidths - ( CopyButtonWidths)
|
||||||
|
|
||||||
ResultEditBoxHalfWidths := (ResultEditBoxWidths / 2) - (MarginSpace /2)
|
ResultsEditAndCopyButtonWidth := CopyButtonWidths + ResultEditBoxWidth + MarginSize
|
||||||
ResultLBRYURLEditBoxWidthPieces := (ResultEditBoxWidths / 4)
|
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
|
ResultLBRYURLEditBoxWidths := ResultLBRYURLEditBoxWidthPieces * 3
|
||||||
|
|
||||||
ResultEditBoxThirdsWidths := (ResultEditBoxWidths / 3) - (MarginSpace /3)
|
ResultEditBoxThirdsWidths := (ResultEditBoxWidth / 3) - (MarginSize /3)
|
||||||
|
ResultsScreenOneThirdsWidth := (ResultEditBoxWidth + CopyButtonWidths + ErrorLogEditBoxWidth) / 3
|
||||||
|
|
||||||
ResultLBRYThumbEditBoxWidth := ResultLBRYURLEditBoxWidthPieces - 5
|
ResultLBRYThumbEditBoxWidth := ResultLBRYURLEditBoxWidthPieces - 5
|
||||||
|
|
||||||
ErrorLogEditBoxXPos := ResultEditBoxWidths + CopyButtonWidths + 30
|
|
||||||
ErrorLogEditBoxHeight := GuiHeight - (MarginSpace * 20) - (ButtonHeights * 2)
|
|
||||||
ErrorLogEditBoxWidth := GuiWidth - ErrorLogEditBoxXPos - (MarginSpace * 12)
|
|
||||||
|
|
||||||
|
|
||||||
ButtonWidths := 150
|
ButtonWidths := 150
|
||||||
ButtonXPos := GuiWidth - ButtonWidths - 15
|
ButtonXPos := GuiWidth - ButtonWidths - 15
|
||||||
@@ -67,11 +74,11 @@ PageTwoGroupBoxWidth := ThumbnailPreviewWidth + 20
|
|||||||
VideoDescriptionEditBoxHeight = 100
|
VideoDescriptionEditBoxHeight = 100
|
||||||
CheckboxesStartYPos := 630
|
CheckboxesStartYPos := 630
|
||||||
|
|
||||||
FilePathEditBoxWidths := EditBoxWidths - MarginSpace - 70
|
FilePathEditBoxWidths := EditBoxWidths - MarginSize - 70
|
||||||
SelectFileButtonWidths := 30
|
SelectFileButtonWidths := 30
|
||||||
|
|
||||||
ButtonStartYPos := CheckboxesStartYPos + 10
|
ButtonStartYPos := CheckboxesStartYPos + 10
|
||||||
MarginSquared := MarginSpace * 2
|
MarginSquared := MarginSize * 2
|
||||||
|
|
||||||
if(DevMode){
|
if(DevMode){
|
||||||
MainButtonHeight := 30
|
MainButtonHeight := 30
|
||||||
@@ -84,14 +91,18 @@ else, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------GUI-------------------------------
|
; -------------------------------GUI-------------------------------
|
||||||
|
SetAndShowMainGUI:
|
||||||
|
Gosub, SetGUIVariables
|
||||||
|
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
Gui, Margin, %MarginSpace%, %MarginSpace%
|
Gui, Margin, %MarginSize%, %MarginSize%
|
||||||
|
|
||||||
; Video Title
|
; Video Title
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
@@ -101,35 +112,35 @@ Gui, Add, Text, x%PodcastNumberTextXPos% yp+0,Podcast #
|
|||||||
|
|
||||||
|
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, y+5 x%MarginSpace% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTitle, %VideoTitle%
|
Gui, Add, Edit, y+5 x%MarginSize% 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+%MarginSize% w%OdyseeURLSlugEditWidth% h%EditBoxHeight% gUpdateVars vLBRYURLSlug, %LBRYURLSlug%
|
||||||
Gui, Add, Edit, yp+0 x+%Marginspace% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
|
Gui, Add, Edit, yp+0 x+%MarginSize% w%PodcastNumberEditWidth% h%EditBoxHeight% gUpdateVars vPodcastNumber, %PodcastNumber%
|
||||||
|
|
||||||
; LBRY URL
|
; LBRY URL
|
||||||
Gui, Font, Bold
|
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, Add, Text,x%ColumnOneHalfWidthXPos% yp+0,Podcast Tags (Comma Seperated)
|
||||||
|
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x%Marginspace% Y+5 w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vVideoTags, %VideoTags%
|
Gui, Add, Edit, x%MarginSize% 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, yp+0 x+%MarginSize% w%EditBoxHalfWidths% h%EditBoxHeight% gUpdateVars vPodcastTags, %PodcastTags%
|
||||||
|
|
||||||
; Description/Summary Headers
|
; Description/Summary Headers
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Text,y+%Marginspace% x%Marginspace%,Description
|
Gui, Add, Text,y+%MarginSize% x%MarginSize%,Description
|
||||||
Gui, Add, Text,yp+0 x%ColumnOneHalfWidthXPos%,Summary
|
Gui, Add, Text,yp+0 x%ColumnOneHalfWidthXPos%,Summary
|
||||||
|
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
; Video Description edit box
|
; Video Description edit box
|
||||||
Gui, Add, Edit,x%Marginspace% y+5 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
Gui, Add, Edit,x%MarginSize% y+5 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoDescription gSubmitDescription,%VideoDescription%
|
||||||
; Video Summary Edit Box
|
; Video Summary Edit Box
|
||||||
Gui, Add, Edit,x%ColumnOneHalfWidthXPos% yp+0 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoSummary gUpdateVars,%VideoSummary%
|
Gui, Add, Edit,x%ColumnOneHalfWidthXPos% yp+0 w%EditBoxHalfWidths% h%VideoDescriptionEditBoxHeight% vVideoSummary gUpdateVars,%VideoSummary%
|
||||||
|
|
||||||
|
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
gui, font, s8
|
gui, font, s8
|
||||||
Gui, Add, Edit, x%Marginspace% y+5 vDescriptionCharCount, %DescriptionCharCount%
|
Gui, Add, Edit, x%MarginSize% y+5 vDescriptionCharCount, %DescriptionCharCount%
|
||||||
Gui, Add,Text, yp+4 x+%MarginSpace%,Limits: DM+Bitchute = 3K, Odysee, Brighteon = 5K
|
Gui, Add,Text, yp+4 x+%MarginSize%,Limits: DM+Bitchute = 3K, Odysee, Brighteon = 5K
|
||||||
; Gui, font, Bold
|
; Gui, font, Bold
|
||||||
|
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
@@ -137,14 +148,14 @@ Gui, font, Bold
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Gui, Add, GroupBox,r8.5 x%MarginSpace% y+10 w%EditBoxWidths% Center, Filepaths
|
Gui, Add, GroupBox,r8.5 x%MarginSize% y+10 w%EditBoxWidths% Center, Filepaths
|
||||||
|
|
||||||
; Video Filepath
|
; Video Filepath
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, Text,xp+5 yp+15,Video Filepath
|
Gui, Add, Text,xp+5 yp+15,Video Filepath
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoFilepath,%VideoFilepath%
|
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
|
; Video Thumbnail Filepath
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
@@ -154,7 +165,7 @@ else,
|
|||||||
Gui, Add, Text,y+15 x%MarginSquared% ,Video Thumbnail Filepath
|
Gui, Add, Text,y+15 x%MarginSquared% ,Video Thumbnail Filepath
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vVideoThumbFilepath,%VideoThumbFilepath%
|
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
|
; WAV Audio File Filepath
|
||||||
Gui, Font, Bold
|
Gui, Font, Bold
|
||||||
if(WavAudioFilepath = "")
|
if(WavAudioFilepath = "")
|
||||||
@@ -167,7 +178,7 @@ else, { ; change text depending on if WAV or FLAC file
|
|||||||
}
|
}
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vWavAudioFilepath,%WavAudioFilepath%
|
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
|
Gui, Font, Bold
|
||||||
if(MP3AudioFilepath = "")
|
if(MP3AudioFilepath = "")
|
||||||
@@ -176,135 +187,114 @@ else,
|
|||||||
Gui, Add, Text,x%MarginSquared% y+15,Podcast MP3 Filepath
|
Gui, Add, Text,x%MarginSquared% y+15,Podcast MP3 Filepath
|
||||||
Gui, Font, Normal
|
Gui, Font, Normal
|
||||||
Gui, Add, Edit, x%MarginSquared% y+2 w%FilePathEditBoxWidths% h%EditBoxHeight% gUpdateVars vMP3AudioFilepath,%MP3AudioFilepath%
|
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
|
; Submit Button
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
gui, Font, Bold
|
gui, Font, Bold
|
||||||
|
|
||||||
; if(DevMode)
|
Gui, Add, Button, w%EditBoxFourthWidths% x%MarginSize% vUpdateAvailable h%SecondaryButtonHeights% gUpdateScript,FVU Up-to-Date
|
||||||
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Close
|
|
||||||
; else,
|
|
||||||
|
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h%SecondaryButtonHeights% gOpenProjectFolder, Open Folder
|
||||||
|
|
||||||
; Script Update Button
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gScheduleUpload, Schedule for Later
|
||||||
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, w%EditBoxFourthWidths% h%SecondaryButtonHeights% x%MarginSize% y+%MarginSize% vChromeUpdateAvailable gUpdateChrome, Chrome Up-to-Date
|
||||||
; Gui, Font, s20
|
|
||||||
; Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x+%MarginSpace% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
|
|
||||||
|
|
||||||
|
Gui, Add, Button, x+%MarginSize% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Status
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gStartScript, UPLOAD
|
||||||
|
|
||||||
Gui, Font, s%GuiFontSize%
|
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
|
||||||
|
|
||||||
; Chrome Update Button
|
Gui, Add, Button, x+%MarginSize% w%EditBoxFourthWidths% h%SecondaryButtonHeights%
|
||||||
if(ChromeUpdateAvailable){
|
Gui, Add, Button, x+%MarginSize% w%EditBoxHalfWidths% h%SecondaryButtonHeights% gReloadScript, Open New Project
|
||||||
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Update Available!
|
|
||||||
}
|
|
||||||
else, {
|
|
||||||
Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+%Marginspace% h%SecondaryButtonHeights% vChromeUpdateAvailable gUpdateChrome center,Chrome Up-to-Date
|
|
||||||
|
|
||||||
}
|
|
||||||
; Gui, Add, Button, x%MarginSpace% w%EditBoxHalfWidths% y+25 h%MainButtonHeight% gCancelPost hwndIcon, Exit
|
|
||||||
; GuiButtonIcon(Icon, "imageres.dll",208, "s20 a1 r2")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(DevMode)
|
|
||||||
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
|
|
||||||
else,
|
|
||||||
Gui, Add, Button, x+%MarginSpace% yp+0 w%EditBoxFourthWidths% h%SecondaryButtonHeights% gDisplayResults, View Results
|
|
||||||
|
|
||||||
Gui, Add, Button, w%EditBoxFourthWidths% x+%Marginspace% h%SecondaryButtonHeights% gOpenProjectFolder, Open Project Folder
|
|
||||||
|
|
||||||
|
|
||||||
if(DevMode){
|
if(DevMode){
|
||||||
Gui, Add, Button, x%MarginSpace% w%EditBoxFourthWidths% h30 y+5 h%SecondaryButtonHeights% gOpenErrorLog, Open ErrorLog
|
Gui, Add, Button, x%MarginSize% 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 h%SecondaryButtonHeights% gClearVideoLinks, Clear VideoLinks
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
|
; -------------------------------Page 2 Side of Main GUI Window-------------------------------
|
||||||
LineSplitXPosition := PageTwoXStartPos - ( MarginSpace * 2)
|
LineSplitXPosition := PageTwoXStartPos - ( MarginSize * 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/
|
gui, add, text, x%LineSplitXPosition% y20 h600 0x11 ; 0x11 is a "line"
|
||||||
; Thumbnail Preview
|
|
||||||
Gui, Font, Normal
|
|
||||||
gui, Font, s4
|
|
||||||
; Miscellaneous Settings
|
; Miscellaneous Settings
|
||||||
|
; DevMode Buttons
|
||||||
|
gui, Font, s4
|
||||||
|
Gui, Font, Normal
|
||||||
DevModToggleButton := PageTwoXStartPos + 160
|
DevModToggleButton := PageTwoXStartPos + 160
|
||||||
Gui, Add, Button, x%DevModToggleButton% y5 w50 h10 gToggleDevMode,DevMode
|
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+%MarginSize% y5 w50 h10 gToggleTestingMode, Testing Mode
|
||||||
Gui, Add, Button, x+5 y5 w50 h10 gOpenGiteaPage, Gitea
|
Gui, Add, Button, x+%MarginSize% y5 w50 h10 gOpenGiteaPage, Gitea
|
||||||
|
|
||||||
Gui, Font, s%GuiFontSize%
|
Gui, Font, s%GuiFontSize%
|
||||||
Gui, Font, Bold
|
Gui, Font, Normal
|
||||||
|
|
||||||
; Settings Section
|
; Settings Section
|
||||||
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
Gui, Add, GroupBox,r6 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
||||||
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
|
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheck%, Auto Update Check
|
||||||
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip of Actions
|
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgress% gUpdateVars,Show Tooltip of Actions
|
||||||
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
|
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUpload%, Kill LBRY After Uploading
|
||||||
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
|
Gui, Add, Checkbox, vErrorLogToDiscord gUpdateVars Checked%ErrorLogToDiscord%, Error Log to Discord
|
||||||
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
|
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-------------------------------
|
; -------------------------------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
|
Gui, Font, s8
|
||||||
; if(VideoFileSizeInMB < 1792)
|
Gui, Font, Bold
|
||||||
; Gui, Add, Checkbox, x+%MarginSpaceDoubled% vFacebook Checked%FacebookCheckStatus%, Facebook
|
Gui, Add, Button, xp+80 yp+0 gUncheckAllPlatforms, Uncheck All
|
||||||
|
|
||||||
Gui, Add, Checkbox, xp+10 yp+25 vBitChute Checked%BitChuteCheckStatus% gUpdateVars, BitChute
|
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% yp+30 vBitChute Checked%BitChute% gUpdateVars, BitChute
|
||||||
|
|
||||||
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
if(LocalsURL = "LocalsUploadStartedNeedToGrabURL"){
|
||||||
; msgbox, checking grab url
|
; 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
|
LocalsGrabURL := 1
|
||||||
Locals := 0
|
Locals := 0
|
||||||
}
|
}
|
||||||
else, {
|
else, {
|
||||||
; msgbox, checking locals
|
; 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
|
LocalsGrabURL := 0
|
||||||
Locals := 1
|
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
|
||||||
|
|
||||||
|
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vRumble Checked%Rumble% gUpdateVars, Rumble
|
||||||
|
|
||||||
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeVideoThumb Checked%OdyseeVideoThumbCheckStatus%,Thumbnail
|
; Brighteon Does not accept videos lower than 300kbps or that don't have the appropriate aspect ratio
|
||||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vOdyseeAudio Checked%OdyseeAudioCheckStatus% gUpdateVars, Odysee Audio
|
if(VideoTotalBitrate < 300000 OR !VideoHasBrighteonCompatibleAspectRatio){
|
||||||
; Gui, Add, Checkbox, x+%MarginSpace% vOdyseeAudioThumb Checked%OdyseeAudioThumbCheckStatus%, Thumbnail
|
if(!VideoHasBrighteonCompatibleAspectRatio)
|
||||||
|
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Aspect Ratio is %VideoAspectRatio%)
|
||||||
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSpace% vRumble Checked%RumbleCheckStatus% gUpdateVars, Rumble
|
else,
|
||||||
|
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
||||||
if(VideoTotalBitrate > 300000)
|
}
|
||||||
Gui, Add, Checkbox, vBrighteon y+%MarginSpace% Checked%BrighteonCheckStatus% gUpdateVars, Brighteon
|
|
||||||
else,{
|
else,{
|
||||||
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSpace% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
|
Gui, Add, Checkbox, vBrighteon y+%MarginSize% Checked%Brighteon% gUpdateVars, Brighteon
|
||||||
}
|
}
|
||||||
|
|
||||||
Gui, Add, Checkbox, vDailyMotion y+%MarginSpace% Checked%DailyMotionCheckStatus% gUpdateVars, DailyMotion
|
Gui, Add, Checkbox, vDailyMotion y+%MarginSize% Checked%DailyMotion% gUpdateVars, DailyMotion
|
||||||
; Gui, Add, Checkbox, vStreamanity Checked%StreamanityCheckStatus%, Streamanity
|
|
||||||
|
|
||||||
; Gui, Font, s12
|
Gui, Font, s%GuiFontSize%
|
||||||
gui, Font, Bold
|
Gui, Font, Bold
|
||||||
Gui, Add, GroupBox, r6.5 y+%MarginSpaceTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
|
Gui, Add, GroupBox, r6.5 y+%MarginSizeTripled% vImageThumbnail x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Thumbnail
|
||||||
gui, Font, Normal
|
gui, Font, Normal
|
||||||
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
|
Gui, Add, Picture, xp+10 yp+20 w%ThumbnailPreviewWidth% h-1, %VideoThumbFilepath%
|
||||||
|
|
||||||
@@ -325,27 +315,16 @@ Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
|
|||||||
ControlFocus, Edit4, %FullScriptName%
|
ControlFocus, Edit4, %FullScriptName%
|
||||||
ToolTip
|
ToolTip
|
||||||
|
|
||||||
|
; calculate run time and convert to seconds
|
||||||
; calculate run time and convert to seconds
|
|
||||||
URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||||
|
|
||||||
;---Check for Updates---
|
|
||||||
|
; - Check for Updates
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
if(AutoUpdateCheck AND !UpdateAvailable){
|
if(AutoUpdateCheck AND !UpdateAvailable){
|
||||||
Message = Checking for Updates
|
SetTimer, CheckForUpdates, -1000
|
||||||
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
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
; calculate run time and convert to seconds
|
; calculate run time and convert to seconds
|
||||||
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||||
|
|
||||||
@@ -353,4 +332,153 @@ Return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Scheduler GUI
|
||||||
|
; ------------------------------------------------
|
||||||
|
ScheduleUpload:
|
||||||
|
gui, Submit, NoHide ; submit the main GUI so all the variables get updated
|
||||||
|
|
||||||
|
; Create GUI for Scheduler
|
||||||
|
Gui, ScheduleGUI:New
|
||||||
|
Gui, Font, s15
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Text,, Date:
|
||||||
|
Gui, Add, DateTime,w%EditBoxHalfWidths% vScheduledDate , MM/dd/yyyy
|
||||||
|
Gui, Add, Text,, Time:
|
||||||
|
Gui, Add, DateTime, w%EditBoxHalfWidths% vScheduledTime Choose200505311900, Time
|
||||||
|
Gui, Add, Button,w%EditBoxHalfWidths% gSubmitScheduler, Schedule
|
||||||
|
Gui, Show,, Scheduler
|
||||||
|
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Results GUI Screen
|
||||||
|
; ------------------------------------------------
|
||||||
|
SetAndShowResultsGUI:
|
||||||
|
; Set the GUI Variables, needed if called from Scheduler
|
||||||
|
Gosub, SetGUIVariables
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard,Transcript URL
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% w%ResultEditBoxWidth% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Bitchute
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidth% gUpdateVars , %BitChuteURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Brighteon
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidth% gUpdateVars , %BrighteonURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, DailyMotion
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidth% gUpdateVars , %DailyMotionURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Odysee Video
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidth% gUpdateVars, %OdyseeVideoURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Odysee Audio
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidth% gUpdateVars , %OdyseeAudioURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Rumble
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidth% gUpdateVars , %RumbleURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Locals
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidth% gUpdateVars, %LocalsURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Unauthorized
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vUnauthorizedTVURL w%ResultEditBoxWidth% gUpdateVars, %UnauthorizedTVURL%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Video Tags
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoTags w%ResultEditBoxWidth% gUpdateVars , %VideoTags%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Podcast Tags
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vPodcasttags w%ResultEditBoxWidth% gUpdateVars , %Podcasttags%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Description
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoDescription w%ResultEditBoxWidth% gUpdateVars , %VideoDescription%
|
||||||
|
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyToClipboard, Summary
|
||||||
|
Gui, Font, Normal
|
||||||
|
|
||||||
|
Gui, Font, Normal
|
||||||
|
Gui, Add, Edit, x+%MarginSize% yp+0 h%ButtonHeights% vVideoSummary w%ResultEditBoxWidth% gUpdateVars , %VideoSummary%
|
||||||
|
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% w%ResultsEditAndCopyButtonWidth% h%SecondaryButtonHeights% gUpdateINI, Save Modified Links to Files
|
||||||
|
|
||||||
|
|
||||||
|
; Error Log Column
|
||||||
|
; ------------------------------------------------
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Add, Button, x+%MarginSize% y%MarginSize% w%ErrorLogEditBoxWidth% h%ButtonHeights% y%MarginSize% gOpenErrorLog, Error Log (Click to Open Detailed Log)
|
||||||
|
Gui, Add, Edit,x%ErrorLogEditBoxXPos% h%ErrorLogEditBoxHeight% w%ErrorLogEditBoxWidth% y+10, %ErrorLogVar%
|
||||||
|
|
||||||
|
gui, font, Normal
|
||||||
|
gui, font, s7
|
||||||
|
Gui, Add, StatusBar,, Total Videos Uploaded: %TotalVideosUploaded% | Total Clicks Saved: %MouseClicksSaved%
|
||||||
|
Gui, +Resize +MaximizeBox
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Gui, add, text, x%MarginSize% y+%MarginSize% w%ResultsGUIWidth% 0x10 ;Horizontal Line > Etched Gray
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; Results GUI Action Buttons
|
||||||
|
; ------------------------------------------------
|
||||||
|
Gui, Font, s%GuiFontSize%
|
||||||
|
Gui, Font, Bold
|
||||||
|
Gui, Add, Button, x%MarginSize% yp+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gOpenLBRYBlobFilesFolder, Open LBRY Blob Folder
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gUploadPodcast vUploadPodcast, Upload Podcast
|
||||||
|
Gui, Add, Button, x+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% gRetryUpload, Try Failed Again
|
||||||
|
|
||||||
|
|
||||||
|
Gui, Add, Button, x%MarginSize% y+%MarginSize% w%ResultsScreenOneThirdsWidth% h%SecondaryButtonHeights% 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
|
Return
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
|
|
||||||
Gui, Font, s%GuiFontSize%
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastTranscriptURL,Transcript URL
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% w%ResultEditBoxWidths% gUpdateVars vPodcastTranscriptURL, %PodcastTranscriptURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBitChuteURL, Bitchute
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBitChuteURL w%ResultEditBoxWidths% gUpdateVars , %BitChuteURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyBrighteonURL, Brighteon
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vBrighteonURL w%ResultEditBoxWidths% gUpdateVars , %BrighteonURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyDailyMotionURL, DailyMotion
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vDailyMotionURL w%ResultEditBoxWidths% gUpdateVars , %DailyMotionURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeVideoURL, Odysee Video
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeVideoURL w%ResultEditBoxWidths% gUpdateVars, %OdyseeVideoURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyOdyseeAudioURL, Odysee Audio
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vOdyseeAudioURL w%ResultEditBoxWidths% gUpdateVars , %OdyseeAudioURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths% gCopyRumbleURL, Rumble
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vRumbleURL w%ResultEditBoxWidths% gUpdateVars , %RumbleURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths%, Locals
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vLocalsURL w%ResultEditBoxWidths% gUpdateVars, %LocalsURL%
|
|
||||||
|
|
||||||
Gui, Font, Bold
|
|
||||||
Gui, Add, Button, x10 y+10 h%ButtonHeights% w%CopyButtonWidths%, Unauthorized
|
|
||||||
Gui, Font, Normal
|
|
||||||
Gui, Add, Edit, x+5 yp+0 h%ButtonHeights% vUnauthorizedTVURL w%ResultEditBoxWidths% gUpdateVars, %UnauthorizedTVURL%
|
|
||||||
|
|
||||||
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 vUploadPodcast, 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")
|
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")
|
TooltipThis("Uploading Video through API")
|
||||||
; Variables of items that need to be replaced before argument is passed to API
|
; Variables of items that need to be replaced before argument is passed to API
|
||||||
Apostrophe = '
|
Apostrophe = '
|
||||||
@@ -201,13 +176,6 @@ if(!InStr(UploadResult, "permanent_url")){ ; if no permanent_url is generated th
|
|||||||
Return
|
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
|
; Transform the Upload Result json into the LBRY.tv link
|
||||||
; PermanentURL := GetPermanentLBRYURL(UploadResult) ; get permanentURL from the upload result json
|
; PermanentURL := GetPermanentLBRYURL(UploadResult) ; get permanentURL from the upload result json
|
||||||
@@ -360,7 +328,40 @@ if(LBRYUploadType = "Audio"){
|
|||||||
IniWrite, %OdyseeAudioURL%, %VideoLinksIniFile%, URLs, OdyseeAudioURL
|
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")
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
; SaveDriverURL()
|
; SaveDriverURL()
|
||||||
AddToTotalVideosUploadedCount()
|
AddToTotalVideosUploadedCount()
|
||||||
|
|||||||
@@ -100,6 +100,14 @@ Loop, 5 {
|
|||||||
sleep, 2000
|
sleep, 2000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; click the "Hide Links Preview" checkbox to hide previews of hyperlinks
|
||||||
|
if(InStr(VideoDescription, "https")){
|
||||||
|
Xpath = (//div[@class='hide-switcher-container'])[1]
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=100)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
; SaveOrPostProgress(Message:="Waiting Video to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
; SaveOrPostProgress(Message:="Waiting Video to finish uploading",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
Message = Uploading Video File
|
Message = Uploading Video File
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
@@ -112,6 +120,19 @@ if(Status){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; make sure the "Notify Users" checkbox is selected
|
||||||
|
Xpath = (//input[contains(@name,'is_do_promo')])[1]
|
||||||
|
|
||||||
|
try, Status := driver.findelementbyxpath(Xpath).isSelected()
|
||||||
|
if(Status = 0){
|
||||||
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=1,SleepLength:=1000)
|
||||||
|
try, Status := driver.findelementbyxpath(Xpath).isSelected()
|
||||||
|
if(Status = "0"){
|
||||||
|
Message = Failed to Check ON the Notify Users Checkbox
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
; check if the "Auto Submit Post" checkbox is checked, and if not check it
|
; check if the "Auto Submit Post" checkbox is checked, and if not check it
|
||||||
js = return document.querySelector("#autosubmit_enabled").checked;
|
js = return document.querySelector("#autosubmit_enabled").checked;
|
||||||
try AutoSubmitstatus := driver.executeScript(js)
|
try AutoSubmitstatus := driver.executeScript(js)
|
||||||
@@ -288,9 +309,9 @@ Loop % VideoTitleArray.Length(){
|
|||||||
|
|
||||||
|
|
||||||
; get longest word in video title to use for grabbing the share link from the raw page
|
; get longest word in video title to use for grabbing the share link from the raw page
|
||||||
RegExMatch(VideoTitle, "ms)\b\S+(?CFindLongestWordInString)\b(?R)", m)
|
; RegExMatch(VideoTitle, "ms)\b\S+(?CFindLongestWordInString)\b(?R)", m)
|
||||||
LongestWordInVideoTitle := longestWord
|
; LongestWordInVideoTitle := longestWord
|
||||||
Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
; Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
||||||
|
|
||||||
; MsgBox, Longest word: %longestWord%`, #%wordLength%
|
; MsgBox, Longest word: %longestWord%`, #%wordLength%
|
||||||
|
|
||||||
@@ -299,9 +320,23 @@ Msgbox % "LongestWordInVideoTitle: " LongestWordInVideoTitle
|
|||||||
|
|
||||||
; Grab Video Share Link From Page Source
|
; Grab Video Share Link From Page Source
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
|
ShareLink := GrabLocalsPostURLUsingTitle(VideoTitle)
|
||||||
|
|
||||||
|
if(!InStr(ShareLink, "https")){
|
||||||
|
Message = Couldn't find Video Share link in the first 10 posts. Is the video possibly still uploading?
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
|
||||||
|
; Msgbox % "ShareLink: " ShareLink
|
||||||
|
|
||||||
|
; Msgbox % "LocalsVideoURL: " LocalsVideoURL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; Iterate over the last couple of posts, find the post with the title that contains the Longest word from the uploaded video
|
; Iterate over the last couple of posts, find the post with the title that contains the Longest word from the uploaded video
|
||||||
; And grab the share URL for it
|
; And grab the share URL for it
|
||||||
|
/*
|
||||||
Message = Looking for - %LongestWordInVideoTitle% - within first 7 posts in order to grab share URL
|
Message = Looking for - %LongestWordInVideoTitle% - within first 7 posts in order to grab share URL
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
@@ -358,6 +393,7 @@ loop, 7 {
|
|||||||
ShareLink :=
|
ShareLink :=
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
if(ShareLink = ""){
|
if(ShareLink = ""){
|
||||||
Message = Video was published succsessfully, but failed to grab Share Link.
|
Message = Video was published succsessfully, but failed to grab Share Link.
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
|||||||
@@ -1,307 +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%
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
*/
|
|
||||||
|
|
||||||
; Split a long string into multiple pieces based on the string lengtht you want and return an array with all strings
|
|
||||||
SplitStringWithSentences(text, maxChunkSize) {
|
|
||||||
sentences := StrSplit(text, "\. ") ; split at period with space after it
|
|
||||||
|
|
||||||
currentChunk := ""
|
|
||||||
chunks := []
|
|
||||||
|
|
||||||
Loop, % sentences.Length()
|
|
||||||
{
|
|
||||||
sentence := sentences[A_Index]
|
|
||||||
CurrentChunkAndSentence := currentChunk . sentence
|
|
||||||
; Msgbox % "CurrentChunkAndSentence: " CurrentChunkAndSentence
|
|
||||||
; msgbox % StrLen(CurrentChunkAndSentence)
|
|
||||||
|
|
||||||
if (StrLen(CurrentChunkAndSentence) <= maxChunkSize)
|
|
||||||
{
|
|
||||||
currentChunk .= sentence . "\. "
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
chunks.Push(currentChunk)
|
|
||||||
currentChunk := sentence . "\. "
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentChunk != "")
|
|
||||||
chunks.Push(currentChunk)
|
|
||||||
|
|
||||||
return chunks
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -247,9 +247,11 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|||||||
Xpath = //textarea[@id='description']
|
Xpath = //textarea[@id='description']
|
||||||
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000)
|
||||||
|
|
||||||
; Input Description
|
; Format text JS
|
||||||
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
JSVideoDescription := FormatTextToJSText(VideoDescription)
|
||||||
|
JSVideoSummary := FormatTextToJSText(VideoSummary)
|
||||||
|
|
||||||
|
; Input Description
|
||||||
js = document.getElementById('description').value = "%JSVideoDescription%";
|
js = document.getElementById('description').value = "%JSVideoDescription%";
|
||||||
try driver.executeScript(js)
|
try driver.executeScript(js)
|
||||||
|
|
||||||
@@ -331,7 +333,7 @@ SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|||||||
; Change GUI button from "Upload Podcast"
|
; Change GUI button from "Upload Podcast"
|
||||||
GuiControl,,UploadPodcast, Podcast Uploaded
|
GuiControl,,UploadPodcast, Podcast Uploaded
|
||||||
|
|
||||||
sleep, 5000
|
; sleep, 5000
|
||||||
|
|
||||||
CurrentSite :=
|
CurrentSite :=
|
||||||
ToolTip
|
ToolTip
|
||||||
|
|||||||
@@ -13,50 +13,74 @@ if(DiscordVideosWebhookURL = ""){
|
|||||||
Msgbox, Unable to Grab DiscordVideosWebhookURL from %SettingsIniFilepath%.`nPlease input the URL and then try again.
|
Msgbox, Unable to Grab DiscordVideosWebhookURL from %SettingsIniFilepath%.`nPlease input the URL and then try again.
|
||||||
Return
|
Return
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
; If description is longer than 2k chars, then API will error out. goto section that will allow user to edit video description to shorten it for posting
|
|
||||||
if(StrLen(SocialMediaDescription) > 2000 AND VideoDescriptionForVideosChannel = ""){
|
|
||||||
Goto, CreateDescriptionForVideosPosting
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
if(SocialMediaDescription = ""){
|
|
||||||
CreateDescriptionForSocialMedia()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SubmitDescriptionForDiscordVideosChannel:
|
|
||||||
Message := "**" . VideoTitle . "**" . "`n" . SocialMediaDescription . "`n"
|
|
||||||
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
||||||
|
|
||||||
if(BitChuteURL != "")
|
|
||||||
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
|
|
||||||
|
|
||||||
if(BrighteonURL != "")
|
VideoLinks :=
|
||||||
Message .= "[Brighteon](<" . BrighteonURL . ">) \| "
|
|
||||||
|
|
||||||
|
TooltipMessage = Checking Bitchute and Brighteon URL for Processing Status
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
; check the status of the Bitchute URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
||||||
|
if(BitChuteURL != "")
|
||||||
|
VideoLinks .= "[BitChute](<" . BitChuteURL . ">) \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
; check the status of the Brighteon URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
||||||
|
if(BrighteonURL != "")
|
||||||
|
VideoLinks .= "[Brighteon](<" . BrighteonURL . ">) \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
ErrorLogMsg = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=ErrorLogMsg,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(OdyseeVideoURL != "")
|
if(OdyseeVideoURL != "")
|
||||||
Message .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
VideoLinks .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||||
|
|
||||||
if(OdyseeAudioURL != "")
|
if(OdyseeAudioURL != "")
|
||||||
Message .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
VideoLinks .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
||||||
|
|
||||||
if(RumbleURL != "")
|
if(RumbleURL != "")
|
||||||
Message .= "[Rumble](<" . RumbleURL . ">) \| "
|
VideoLinks .= "[Rumble](<" . RumbleURL . ">) \| "
|
||||||
|
|
||||||
if(DailyMotionURL != "")
|
if(DailyMotionURL != "")
|
||||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
VideoLinks .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
||||||
|
|
||||||
if(PodcastTranscriptURL != "")
|
if(PodcastTranscriptURL != "")
|
||||||
Message .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
VideoLinks .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
||||||
|
|
||||||
if(PodcastNumber != "")
|
if(PodcastNumber != "")
|
||||||
Message .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
VideoLinks .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||||
|
|
||||||
|
|
||||||
UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
; StrLenOfDiscordMessage :=
|
||||||
|
|
||||||
|
; trim the video description if Title + Body + Links is longer than 2000 chars
|
||||||
|
if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(VideoLinks)) > 2000){
|
||||||
|
|
||||||
|
DiscordAPICharsLeft := 2000 - StrLen(VideoTitle) - StrLen(VideoLinks) - 15
|
||||||
|
|
||||||
|
DiscordVideoDescription := SubStr(VideoDescription, 1, DiscordAPICharsLeft) . "..."
|
||||||
|
}
|
||||||
|
else,
|
||||||
|
DiscordVideoDescription := VideoDescription
|
||||||
|
|
||||||
|
Message := "**" . VideoTitle . "**" . "`n" . VideoLinks . "`n" . DiscordVideoDescription
|
||||||
|
|
||||||
|
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")
|
SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|||||||
@@ -45,11 +45,31 @@ TelegramBodymessage := ASCIISTRReplace(VideoDescription)
|
|||||||
|
|
||||||
LineBreakChar = `%0A ; Used for API
|
LineBreakChar = `%0A ; Used for API
|
||||||
|
|
||||||
if(BitChuteURL != "")
|
|
||||||
VideoLinks .= "[BitChute](" . BitChuteURL . ") \| "
|
|
||||||
|
|
||||||
if(BrighteonURL != "")
|
|
||||||
VideoLinks .= "[Brighteon](" . BrighteonURL . ") \| "
|
; check the status of the Bitchute URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BitChuteURL), "404 - Page not found")){
|
||||||
|
if(BitChuteURL != "")
|
||||||
|
VideoLinks .= "[BitChute](" . BitChuteURL . ") \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
LogMessage = Bitchute URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
; check the status of the Brighteon URL to see if it's done processing
|
||||||
|
; shows "404 - Page not found" on page if not
|
||||||
|
if(!InStr(URLDownloadToVar(BrighteonURL), "SELECTED IS NOT CURRENTLY AVAILABLE")){
|
||||||
|
if(BrighteonURL != "")
|
||||||
|
VideoLinks .= "[Brighteon](" . BrighteonURL . ") \| "
|
||||||
|
}
|
||||||
|
else, {
|
||||||
|
LogMessage = Brighteon URL skipped, URL Currently leads to: 404 - page not found
|
||||||
|
SaveOrPostProgress(Message:=LogMessage,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(OdyseeVideoURL != "")
|
if(OdyseeVideoURL != "")
|
||||||
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||||
@@ -83,6 +103,11 @@ StrLenOfMessageAndVideoLinks := StrLen(TelegramVideoTitle) + StrLen(TelegramBody
|
|||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
if(StrLenOfMessageAndVideoLinks < 1024) {
|
if(StrLenOfMessageAndVideoLinks < 1024) {
|
||||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
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")){
|
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.
|
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
@@ -104,48 +129,59 @@ if(StrLenOfMessageAndVideoLinks < 4096){
|
|||||||
; Photo and Video Title go into SendPhoto
|
; Photo and Video Title go into SendPhoto
|
||||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
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
|
; Video Description goes into TelegramMessage
|
||||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
Status := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||||
|
; Output returned data to ErrorLog File
|
||||||
|
Message = API Response:`n%Status%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
|
||||||
} else, {
|
} else, {
|
||||||
; If Title, links and message are longer than 4096 chars, we need to split them into multiple messages
|
; If Title, links and message are longer than 4096 chars, we need to split them into multiple messages
|
||||||
; ------------------------------------------------
|
; ------------------------------------------------
|
||||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
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
|
; 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.
|
; Used 4095 because a ". " has to be put in at the end of the chunk.
|
||||||
VideoDescriptionChunks := SplitStringWithSentences(TelegramBodymessage, 4094)
|
VideoDescriptionChunks := SplitStringWithSentences(TelegramBodymessage, 4094)
|
||||||
|
|
||||||
|
|
||||||
; go through array and post each chunk as new message
|
; go through array and post each chunk as new message
|
||||||
Loop % VideoDescriptionChunks.Length(){
|
Loop % VideoDescriptionChunks.Length(){
|
||||||
; ArrayItem := ARRAY[A_Index]
|
; ArrayItem := ARRAY[A_Index]
|
||||||
Description := VideoDescriptionChunks[A_Index]
|
Description := VideoDescriptionChunks[A_Index]
|
||||||
|
|
||||||
|
|
||||||
SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
Status := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
||||||
; Clipboard := Description
|
; Output returned data to ErrorLog File
|
||||||
; msgbox % Description
|
Message = API Response:`n%Status%
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
|
||||||
|
|
||||||
}
|
; Clipboard := Description
|
||||||
|
; msgbox % Description
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
Message = Video Links Posted to Telegram Successfully
|
Message = Video Links Posted to Telegram Successfully
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||||
|
|
||||||
|
|
||||||
; sleep, 2000
|
; sleep, 2000
|
||||||
|
|
||||||
|
|
||||||
ToolTip
|
ToolTip
|
||||||
CurrentSite :=
|
CurrentSite :=
|
||||||
Return
|
Return
|
||||||
; -------------------------------/Telegram-------------------------------
|
; -------------------------------/Telegram-------------------------------
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ try CurrentURL := driver.URL
|
|||||||
if(InStr(CurrentURL, "/login.php")){
|
if(InStr(CurrentURL, "/login.php")){
|
||||||
|
|
||||||
if(AutoLogin){
|
if(AutoLogin){
|
||||||
Message = Logging in Automatically by clicking into the UN+PW fields for info to register
|
Message = Trying to Log in Automatically by clicking into the UN+PW fields for info to register from Password Manager
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
; have to click into username and password field for page to register that there's input
|
; have to click into username and password field for page to register that there's input
|
||||||
@@ -39,11 +39,12 @@ if(InStr(CurrentURL, "/login.php")){
|
|||||||
js = document.querySelector("button[type='submit']").click();
|
js = document.querySelector("button[type='submit']").click();
|
||||||
driver.executeScript(js)
|
driver.executeScript(js)
|
||||||
|
|
||||||
|
|
||||||
; Do a double check to make sure that login worked
|
; Do a double check to make sure that login worked
|
||||||
Message = Checking Login Status
|
Message = Checking Login Status
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
sleep, 5000
|
||||||
|
|
||||||
try CurrentURL := driver.URL
|
try CurrentURL := driver.URL
|
||||||
|
|
||||||
if(!InStr(CurrentURL, "/upload")){
|
if(!InStr(CurrentURL, "/upload")){
|
||||||
@@ -67,11 +68,10 @@ if(InStr(CurrentURL, "/login.php")){
|
|||||||
sleep, 5000
|
sleep, 5000
|
||||||
}
|
}
|
||||||
|
|
||||||
; CheckForAlerts()
|
|
||||||
|
|
||||||
Message = Uploading Video File
|
Message = Uploading Video File
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
||||||
|
|
||||||
Xpath = //input[@id='Filedata']
|
Xpath = //input[@id='Filedata']
|
||||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoFilepath)
|
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=VideoFilepath)
|
||||||
@@ -84,6 +84,9 @@ if(Status){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Message = Inputting Video Information
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
; Input Title
|
; Input Title
|
||||||
try driver.findElementsByName("title").item[1].SendKeys(VideoTitle) ;selects element based on Name and sends variable to it.
|
try driver.findElementsByName("title").item[1].SendKeys(VideoTitle) ;selects element based on Name and sends variable to it.
|
||||||
catch e {
|
catch e {
|
||||||
@@ -117,30 +120,22 @@ Loop, 5 { ; Attempt to input video description a couple of times
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Input Primary Category
|
||||||
|
Xpath = (//input[@placeholder='- Primary category -'])[1]
|
||||||
|
try, driver.FindElementByXPath(Xpath).SendKeys("Podcasts").SendKeys(driver.Keys.ENTER)
|
||||||
; sleep, 5000
|
|
||||||
|
|
||||||
|
|
||||||
Message = Selecting Channel
|
Message = Selecting Channel
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; try driver.findElementsByID("channelId").item[1].click()
|
|
||||||
|
|
||||||
; @todo replace with regex
|
; @todo replace with regex
|
||||||
js = return document.querySelector("#channelId").innerHTML;
|
js = return document.querySelector("#channelId").innerHTML;
|
||||||
try, ChannelIDNumber := driver.executeScript(js)
|
try, ChannelIDNumber := driver.executeScript(js)
|
||||||
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
||||||
ChannelIDNumber := StrSplit(ChannelIDNumber, "option value=")
|
ChannelIDNumber := StrSplit(ChannelIDNumber, "option value=")
|
||||||
|
|
||||||
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
|
||||||
|
|
||||||
ChannelIDNumber := ChannelIDNumber[3]
|
ChannelIDNumber := ChannelIDNumber[3]
|
||||||
; Msgbox % "ChannelIDNumber: " ChannelIDNumber
|
|
||||||
|
|
||||||
SingleQuote = "
|
SingleQuote = "
|
||||||
ChannelIDNumber := StrSplit(ChannelIDNumber, "data-private")
|
ChannelIDNumber := StrSplit(ChannelIDNumber, "data-private")
|
||||||
ChannelIDNumber := ChannelIDNumber[1]
|
ChannelIDNumber := ChannelIDNumber[1]
|
||||||
|
|||||||
64
README.md
64
README.md
@@ -1,16 +1,28 @@
|
|||||||
# Freedomain-Video-Uploader
|
# Automated Video and Podcast Uploading to Multiple Sites using Autohotkey, Selenium, and Platform APIs
|
||||||
|
|
||||||
Video Uploader written for the [Freedomain Philosophy Show](https://freedomain.com/)
|

|
||||||
|
|
||||||

|
# Supported Platforms
|
||||||
|
| Platform | Upload Type |
|
||||||
|
|--|--|--|
|
||||||
|
| Locals | Video Upload w/Selenium |
|
||||||
|
| Bitchute | Video Upload w/Selenium |
|
||||||
|
| Rumble | Video Upload w/Selenium |
|
||||||
|
| DailyMotion | Video Upload w/Selenium |
|
||||||
|
| Brighteon | Video Upload w/Selenium |
|
||||||
|
| Odysee | Video + Audio Upload w/LBRY API |
|
||||||
|
| FDRPodcasts | Podcast w/Selenium |
|
||||||
|
| Discord | Announcement w/API |
|
||||||
|
| Telegram | Announcement w/API |
|
||||||
|
|
||||||
|
## Other Features
|
||||||
## Features
|
- Install Uploader Updates from Gitea automatically
|
||||||
Automated posting to the following media platform using either the Platform's API or Selenium Chrome automation.
|
- Install Chrome Updates from chromium.org automatically
|
||||||
|
- Schedule Posts for a later date & time
|
||||||
|**Locals**|**Bitchute**|**Rumble**|**DailyMotion**|**Brighteon**|**Odysee**
|
- Log Errors to a Discord Channel using webhook
|
||||||
|--|--|--|--|--|--|
|
- Discord Ping on Upload Completion
|
||||||
|Selenium|Selenium|Selenium|Selenium|Selenium|LBRY API
|
- Setting to confirm an upload before it's published
|
||||||
|
- Setting to show Tooltip progress at top of the screen showing current action being executed
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
1. Install .Net Framework 3.5
|
1. Install .Net Framework 3.5
|
||||||
@@ -28,14 +40,11 @@ Automated posting to the following media platform using either the Platform's AP
|
|||||||
- When run, the Uploader will automatically create the folders and files it requires in the same directory it's run from.
|
- When run, the Uploader will automatically create the folders and files it requires in the same directory it's run from.
|
||||||
|
|
||||||
# Using Portable Version of Chrome
|
# Using Portable Version of Chrome
|
||||||
Using a portable version of Chrome will give you full control over chrome and chromedriver updates.
|
Using Selenium with a portable `Chrome for Testing` version of Chrome is the preferred way of uploading as it gives you full control over chrome and chromedriver updates and when to install them.
|
||||||
|
- When running the uploader for the first time, you will be notified that `Chrome for Testing` was not found and that you can download it by clicking the `Chrome Up to Date` button. This will automatically get the latest version of Chrome and download + extract it to the the `\lib\` folder. It will also download the appropriate `chromedriver.exe` file for that version and prompt you for admin permission to move it to `C:\Program Files\SeleniumBasic\chromedriver.exe`.
|
||||||
|
|
||||||
The Uploader will check for a portable version of Chrome first, before defaulting to the system installation
|
# Windows Defender False Positive
|
||||||
|
Windows Defender will sometimes flag the compiled .exe version as a false positive. The easiest way to get around this is to whitelist the directory the folder where you're keeping the Uploader files in. To do this, open up `Windows Powershell` as Administrator and run the following command: `Add-MpPreference -ExclusionPath "PATHTOTHEFOLDER"`, eg: `Add-MpPreference -ExclusionPath "C:\Users\yuriy\Downloads\VideoUploader"`
|
||||||
1. To use a portable version of Chrome, download the latest version Chrome version that has a chromedriver from [Chrome-for-Testing](https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json), extract the `chrome-win64.zip` file and move the extracted folder to the `\Lib\` directory:
|
|
||||||
The resulting chrome filepath should be `..\Freedomain-Video-Uploader-Folder\Lib\chrome-win64\chrome.exe`
|
|
||||||
|
|
||||||
2. Download the `win64` chromedriver for the same version and move it to `C:\Program Files\SeleniumBasic\chromedriver.exe`
|
|
||||||
|
|
||||||
# Settings File
|
# Settings File
|
||||||
The Uploader reads & saves its settings to a `settings.ini` file, All customization, including custom profile URLs are stored here.
|
The Uploader reads & saves its settings to a `settings.ini` file, All customization, including custom profile URLs are stored here.
|
||||||
@@ -71,6 +80,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>
|
`*.jpg` or `*.png` file which will be the thumbnail for your video/podcast<br>
|
||||||
|
|
||||||
|
|
||||||
|
# LBRY Desktop Application `daemon_settings.yml`
|
||||||
|
Due to the LBRY Video Platform 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` [Source](https://www.reddit.com/r/lbry/comments/11zwtmj/is_lbry_down/)
|
||||||
|
```
|
||||||
|
lbryum_servers:
|
||||||
|
- a-hub1.odysee.com:50001
|
||||||
|
- spv11.lbry.com:50001
|
||||||
|
- spv19.lbry.com:50001
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# Uncaught Errors
|
# Uncaught Errors
|
||||||
@@ -83,7 +101,13 @@ I have done my best to catch any possible errors that might pop up and write fun
|
|||||||
2. `git clone` the project and then either run the `Compile Uploader to EXE.ahk` autohotkey script to automatically compile, or start up the AHK compiler that comes installed with Autohotkey and select the `Freedomain Video Uploader.ahk` and `\Assets\FreedomainVideo.ico` icon.
|
2. `git clone` the project and then either run the `Compile Uploader to EXE.ahk` autohotkey script to automatically compile, or start up the AHK compiler that comes installed with Autohotkey and select the `Freedomain Video Uploader.ahk` and `\Assets\FreedomainVideo.ico` icon.
|
||||||
|
|
||||||
|
|
||||||
# Extra Tools
|
# Helper Tools
|
||||||
## LBRY-Process-Killer
|
The following tools will be automatically downloaded from Gitea as needed in order to do the following actions.
|
||||||
|
|
||||||
Autohotkey script that continuously reads the lbrynet.log for when your videos are fully uploaded/seeded to lbry and then kills the LBRY process.
|
## LBRY-Process-Killer
|
||||||
|
Program that continuously reads the lbrynet.log for when your videos are fully uploaded/seeded to lbry and then kills the LBRY process. This can be be disabled using the `Kill LBRY after Uploading` checkbox on the main screen
|
||||||
|
|
||||||
|
## Post Scheduler
|
||||||
|
Program that continually checks the `Scheduled Posts` folder and automatically starts the Uploader with the specific video/post at the specified scheduled time.
|
||||||
|
|
||||||
|
##
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
[Video-Uploader]
|
[Video-Uploader]
|
||||||
Version=3.36
|
Version=3.41
|
||||||
Name=Freedomain Video Uploader
|
Name=Freedomain Video Uploader
|
||||||
|
|||||||
Reference in New Issue
Block a user