Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b59bfbe2cf | |||
| c4b2eeea8e | |||
| 723dec3fac | |||
| c60a45445c | |||
| fa43716ebe | |||
| ef3cb41e9c | |||
| 777cfaa242 |
@@ -46,6 +46,8 @@ UStartTime := A_TickCount ; start time
|
||||
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\StdOutToVar.ahk
|
||||
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Zip.ahk
|
||||
#include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\URLDownloadToVar.ahk
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Miscellaneous-Functions.ahk ; Misc functions for video uploading specifically
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\LBRY-Functions.ahk ; LBRY Specific Functions
|
||||
|
||||
|
||||
;---Global Variables---
|
||||
@@ -80,7 +82,6 @@ global ErrorLoggingFilePath
|
||||
global ErrorLogVar
|
||||
ErrorLogVar :=
|
||||
|
||||
global ReuseTabs ; reuse tabs variable
|
||||
global DevMode
|
||||
|
||||
global LBRYNetFilepath
|
||||
@@ -140,7 +141,6 @@ IniRead, MouseClicksSaved, %SettingsIniFilepath%, General, MouseClicksSaved, 0
|
||||
IniRead, ShowTooltipProgress, %SettingsIniFilepath%, General, ShowTooltipProgress, 1
|
||||
(ShowTooltipProgress)?(ShowTooltipProgressCheckStatus := 1) : (ShowTooltipProgressCheckStatus := 0)
|
||||
|
||||
ReuseTabs := 1 ; ReuseTabs is permanantly on. There is never a time where you want to create new tabs for every website
|
||||
|
||||
IniRead, AutoUpdateCheck, %SettingsIniFilepath%, General, AutoUpdateCheck, 1
|
||||
(AutoUpdateCheck)?(AutoUpdateCheckCheckStatus := 1) : (AutoUpdateCheckCheckStatus := 0)
|
||||
@@ -296,7 +296,7 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
|
||||
|
||||
}
|
||||
|
||||
if(FileExt = "png" OR FileExt = "jpg"){
|
||||
if(FileExt = "png" OR FileExt = "jpg" OR FileExt = "jpeg"){
|
||||
VideoThumbFilepath := A_LoopFileFullPath
|
||||
}
|
||||
}
|
||||
@@ -348,8 +348,8 @@ Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the direct
|
||||
VideoLinksIniFile = %VideoFolderDir%\VideoLinks.ini
|
||||
|
||||
if(FileExist(VideoLinksIniFile)){
|
||||
; IniRead, StreamanityURL, %VideoLinksIniFile%, URLs, StreamanityURL, %A_Space%
|
||||
IniRead, BitChuteURL, %VideoLinksIniFile%, URLs, BitChuteURL, %A_Space%
|
||||
|
||||
; LBRY
|
||||
IniRead, LBRYURLSlug, %VideoLinksIniFile%, Misc, LBRYURLSlug, %A_Space%
|
||||
if(LBRYURLSlug = ""){
|
||||
@@ -377,7 +377,9 @@ if(FileExist(VideoLinksIniFile)){
|
||||
IniRead, DailyMotionURL, %VideoLinksIniFile%, URLs, DailyMotionURL, %A_Space%
|
||||
IniRead, PodcastNumber, %VideoLinksIniFile%, Misc, PodcastNumber, %A_Space%
|
||||
IniRead, LocalsURL, %VideoLinksIniFile%, URLs, LocalsURL, %A_Space%
|
||||
IniRead, FacebookURL, %VideoLinksIniFile%, URLs, FacebookURL, %A_Space%
|
||||
IniRead, PodcastTranscriptURL, %VideoLinksIniFile%, URLs, PodcastTranscriptURL, %A_Space%
|
||||
IniRead, UnauthorizedTVURL, %VideoLinksIniFile%, URLs, UnauthorizedTVURL, %A_Space%
|
||||
|
||||
|
||||
; MISC
|
||||
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
|
||||
@@ -651,7 +653,7 @@ if(!status){
|
||||
|
||||
Status := DownloadLatestChromium()
|
||||
if(Status)
|
||||
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Dat
|
||||
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Date
|
||||
|
||||
|
||||
Return
|
||||
@@ -741,7 +743,6 @@ if(VideoDescription != OriginalVideoDescription){
|
||||
; -------------------------------/Save Video Info-------------------------------
|
||||
|
||||
; Save settings to config file
|
||||
IniWrite, %ReuseTabs%, %SettingsIniFilepath%, General, ReuseTabs
|
||||
IniWrite, %ShowTooltipProgress%, %SettingsIniFilepath%, General, ShowTooltipProgress
|
||||
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, General, AutoUpdateCheck
|
||||
IniWrite, %AutoLogin%, %SettingsIniFilepath%, General, AutoLogin
|
||||
@@ -1026,9 +1027,10 @@ if(SocialMediaPosterFilepath = "" or !FileExist(SocialMediaPosterFilepath)){
|
||||
; ------------------------------------------------
|
||||
; @todo: this can be converted into 1 gosub, with if/else statements based on the button clicked
|
||||
|
||||
CopyPodcastNumber:
|
||||
Clipboard := PodcastNumber
|
||||
SaveOrPostProgress(Message:=PodcastNumber "`nCopied to Clipboard",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
CopyPodcastTranscriptURL:
|
||||
Clipboard := PodcastTranscriptURL
|
||||
Message := PodcastTranscriptURL . "`nCopied to Clipboard"
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
sleep, 1000
|
||||
ToolTip
|
||||
Return
|
||||
@@ -1108,7 +1110,8 @@ Return
|
||||
; @todo: Add thumbnail status to this
|
||||
; @todo: add podcast tags to this
|
||||
UpdateINI:
|
||||
IniWrite, %PodcastNumber%, %VideoLinksIniFile%, URLs, PodcastNumber
|
||||
IniWrite, %UnauthorizedTVURL%, %VideoLinksIniFile%, URLs, UnauthorizedTVURL
|
||||
IniWrite, %PodcastTranscriptURL%, %VideoLinksIniFile%, URLs, PodcastTranscriptURL
|
||||
IniWrite, %VideoTitle%, %VideoLinksIniFile%, Misc, VideoTitle
|
||||
IniWrite, %LocalsURL%, %VideoLinksIniFile%, URLs, LocalsURL
|
||||
IniWrite, %RumbleURL%, %VideoLinksIniFile%, URLs, RumbleURL
|
||||
@@ -1202,6 +1205,7 @@ Return
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Podcast-Upload.ahk
|
||||
|
||||
; Miscellaneous-Functions
|
||||
;------------------------------------------------
|
||||
#Include %A_ScriptDir%\Modules\Miscellaneous-Functions.ahk
|
||||
|
||||
; Update Functionality
|
||||
; ------------------------------------------------
|
||||
#Include %A_ScriptDir%\Lib\Freedomain-Posters-Shared-Functions\Update-Functions.ahk
|
||||
Submodule Lib/Freedomain-Posters-Shared-Functions updated: e32fe026e9...8395c5c367
@@ -253,7 +253,7 @@ Gui, Font, Bold
|
||||
; Settings Section
|
||||
Gui, Add, GroupBox,r5 y+0 x%PageTwoXStartPos% w%PageTwoGroupBoxWidth%,Settings
|
||||
Gui, Add, Checkbox, xp+10 yp+20 vAutoUpdateCheck gUpdateVars Checked%AutoUpdateCheckCheckStatus%, Auto Update Check
|
||||
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip Progress
|
||||
Gui, Add, Checkbox, vShowTooltipProgress Checked%ShowTooltipProgressCheckStatus% gUpdateVars,Show Tooltip of Actions
|
||||
Gui, Add, Checkbox, vKillLBRYAfterUpload Checked%KillLBRYAfterUploadCheckStatus%, Kill LBRY After Uploading
|
||||
Gui, Add, Checkbox, vAutoLogin gUpdateVars Checked%AutoLoginCheckStatus%, Try to Login Automatically
|
||||
Gui, Add, Checkbox, vPingOnCompletion gUpdateVars Checked%PingOnCompletionCheckStatus%, Discord Ping Upon Completion
|
||||
@@ -325,4 +325,19 @@ Gui, Show,, %FullScriptName% - Upload Settings - %BodyTextFilePath%
|
||||
ControlFocus, Edit4, %FullScriptName%
|
||||
ToolTip
|
||||
|
||||
|
||||
; calculate run time and convert to seconds
|
||||
URunTime1 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
;---Check for Updates---
|
||||
;------------------------------------------------
|
||||
if(AutoUpdateCheck AND !UpdateAvailable){
|
||||
SetTimer, CheckForUpdates, -1000
|
||||
}
|
||||
|
||||
|
||||
; calculate run time and convert to seconds
|
||||
URunTime2 := round(((A_TickCount - UStartTime) / 1000), 2)
|
||||
|
||||
Return
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
; Gui, Add, Text,x10 y+10, Podcast #:
|
||||
Gui, Add, Button, x10 y+%Marginspace% h%ButtonHeights% w%CopyButtonWidths% gCopyPodcastNumber, Podcast #
|
||||
Gui, 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 vPodcastNumber, %PodcastNumber%
|
||||
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
|
||||
@@ -41,6 +40,11 @@ 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
|
||||
@@ -60,7 +64,7 @@ Gui, Font, s%GuiFontSize%
|
||||
Gui, Font, Bold
|
||||
|
||||
Gui, Add, Button, x%ResultEditBoxXPos% w%ResultEditBoxHalfWidths% gUpdateINI, Save Modified Links
|
||||
Gui, Add, Button, x+%MarginSpace% w%ResultEditBoxHalfWidths% gUploadPodcast, Upload Podcast
|
||||
Gui, Add, Button, x+%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
|
||||
|
||||
@@ -1,271 +0,0 @@
|
||||
|
||||
; -------------------------------Functions-------------------------------
|
||||
|
||||
OnMsgBoxConfirmChromiumOverwrite() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Cancel
|
||||
ControlSetText Button2, Yes
|
||||
}
|
||||
}
|
||||
|
||||
; https://www.autohotkey.com/docs/v2/Functions.htm#Variadic
|
||||
Join(sep, params*) {
|
||||
For index, param in params
|
||||
str .= param . sep
|
||||
return SubStr(str, 1, -StrLen(sep))
|
||||
}
|
||||
|
||||
|
||||
CheckLBRYProcess(){
|
||||
; Check if LBRY Process exists
|
||||
Process, Exist,LBRY.exe
|
||||
if(ErrorLevel = 0) ; if doesn't exist
|
||||
{
|
||||
Message = Not Running. Starting up LBRY.exe
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
LBRYExeFilepath = C:\Program Files\LBRY\LBRY.exe
|
||||
if(!FileExist(LBRYExeFilepath)){
|
||||
Message = Failed to Find LBRY.exe executable. LBRY not installed?
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
|
||||
Message = Checking LBRY daemon_settings.yml file for Odysee Wallet Servers
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
FileRead, daemon_settingsFileContent, C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings.yml
|
||||
|
||||
if(!InStr(daemon_settingsFileContent, "a-hub1.odysee.com")){
|
||||
Message = Odysee wallet server is not in daemon_settings.yml. Replacing File with required settings.
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",DiscordErrorLogging")
|
||||
|
||||
LBRYDaemonSettingsFP = C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings.yml
|
||||
LBRYDaemonSettingsBackupFP = C:\Users\%A_UserName%\AppData\Local\lbry\lbrynet\daemon_settings_BU.yml
|
||||
|
||||
|
||||
; Msgbox % "daemon_settingsText: " daemon_settingsText
|
||||
FileMove, %LBRYDaemonSettingsFP%, %LBRYDaemonSettingsBackupFP%, 1 ; Dest [, Flag (1 = overwrite)]
|
||||
|
||||
UrlDownloadToFile, https://freedomain.dev/yuriy/video-uploader/raw/branch/main/Assets/daemon_settings.yml , %LBRYDaemonSettingsFP%
|
||||
|
||||
sleep, 1000
|
||||
|
||||
if(!FileExist(LBRYDaemonSettingsFP)){
|
||||
Message = Failed to download the custom daemon_settings.yml file from git. Restoring Original File
|
||||
SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
FileMove,%LBRYDaemonSettingsBackupFP%,%LBRYDaemonSettingsFP%, 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try run, "%LBRYExeFilepath%"
|
||||
Message = Waiting 1 Minute for LBRY to start up
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||
Sleep, 60000 ; 1 minute
|
||||
|
||||
Process, Exist,LBRY.exe
|
||||
if(ErrorLevel = 0) ; if doesn't exist
|
||||
{
|
||||
Message = Failed to Start LBRY.exe after 60 seconds of waiting
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
Return
|
||||
}
|
||||
WinMinimize, LBRY
|
||||
}
|
||||
Return
|
||||
}
|
||||
|
||||
|
||||
GetPermanentLBRYURL(UploadResult){
|
||||
SingleQuotationmark = "
|
||||
|
||||
UploadResult := StrSplit(UploadResult, "`n") ; split results by new line
|
||||
|
||||
; Iterate through the array of the results
|
||||
Loop % UploadResult.Length() {
|
||||
PermanentURL := UploadResult[A_Index]
|
||||
if(InStr(PermanentURL, "permanent_url"))
|
||||
Break
|
||||
}
|
||||
|
||||
; Starting Result: "permanent_url": "lbry://Test-Video-161-Numbered#c9ad9afe54c7178d6f870b59bbe129aef8efc3ff",
|
||||
PermanentURL := StrSplit(PermanentURL, "lbry:")
|
||||
PermanentURL := "lbry:" . PermanentURL[2]
|
||||
PermanentURL := StrReplace(PermanentURL, ",", "")
|
||||
PermanentURL := StrReplace(PermanentURL, SingleQuotationmark, "")
|
||||
PermanentURL := StrReplace(PermanentURL, "`n", "")
|
||||
PermanentURL := StrReplace(PermanentURL, "`r", "")
|
||||
|
||||
; End Result lbry://Test-Video-161-Numbered#c9ad9afe54c7178d6f870b59bbe129aef8efc3ff
|
||||
Return PermanentURL
|
||||
}
|
||||
|
||||
|
||||
GetLBRYCanonicalURL(LBRYJSONObject){ ; input json string
|
||||
; ResolveURL := StrSplit(LBRYResolveAPICommand, "lbry://")
|
||||
; ResolveURL := "lbry://" . ResolveURL[2]
|
||||
; StrReplace(Haystack, SearchText [, ReplaceText, OutputVarCount, Limit := -1])
|
||||
LBRYPermanentURLJsonOBJ := StrReplace(LBRYJSONObject, LBRYPermanentURL, "LBRYPermanentURL")
|
||||
; clipboard := LBRYPermanentURLJsonOBJ
|
||||
; DevModeMsgBox(LBRYPermanentURLJsonOBJ)
|
||||
|
||||
try parsed := JSON.Load(LBRYPermanentURLJsonOBJ)
|
||||
try LBRYCanonicalURL := parsed.LBRYPermanentURL.canonical_url
|
||||
|
||||
; DevModeMsgBox(LBRYCanonicalURL)
|
||||
|
||||
if(LBRYCanonicalURL = ""){
|
||||
Return "" ; return blank
|
||||
}
|
||||
|
||||
; otherwise return the LBRY url
|
||||
LBRYCanonicalURL := StrReplace(LBRYCanonicalURL, "lbry://", "https://lbry.tv/")
|
||||
Return LBRYCanonicalURL
|
||||
}
|
||||
|
||||
|
||||
LBRYCMDTextReplacement(LBRYURLSlug){
|
||||
SingleQUote = "
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, " ", "_") ; replace all spaces with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ":", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ",", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "?", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "!", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "`;", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "/", "_") ; replace all colons with dashes
|
||||
; LBRYURLSlug := StrReplace(LBRYURLSlug, "?", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "<", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ">", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, SingleQUote, "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "'", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "=", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ";", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, ")", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "(", "") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "___", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "__", "_") ; replace all colons with dashes
|
||||
LBRYURLSlug := StrReplace(LBRYURLSlug, "__", "_") ; replace all colons with dashes
|
||||
Return LBRYURLSlug
|
||||
}
|
||||
|
||||
GetLBRYAPIErrorFromString(UploadResult){
|
||||
UploadResultArray := StrSplit(UploadResult, "message")
|
||||
LBRYAPIError := UploadResultArray[2]
|
||||
; LBRYAPIErrorStrLen := StrLen(LBRYAPIError)
|
||||
|
||||
; LBRYAPIErrorStrToTrim := LBRYAPIErrorStrLen - 3
|
||||
; Msgbox % "LBRYAPIErrorStrToTrim: " LBRYAPIErrorStrToTrim
|
||||
LBRYAPIError := SubStr(LBRYAPIError, 4)
|
||||
LBRYAPIError := StrReplace(LBRYAPIError, "}", "")
|
||||
|
||||
|
||||
; Msgbox % "LBRYAPIError: " LBRYAPIError
|
||||
Return LBRYAPIError
|
||||
|
||||
}
|
||||
|
||||
|
||||
LogErrorToTextFile(Error){
|
||||
/* if(LogErrorsToTextFile != 1)
|
||||
Return
|
||||
*/
|
||||
ErrorLoggingFile := VideoFolderDir . "\" . "ErrorLogging.txt"
|
||||
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
|
||||
text =
|
||||
(
|
||||
|
||||
|
||||
---------------%TodayDate%---------------
|
||||
%CurrentSite%: %Error%
|
||||
|
||||
|
||||
)
|
||||
if(LogErrorsToMsgbox)
|
||||
Msgbox % "Text: " Text
|
||||
|
||||
FileAppend, %Text%, %ErrorLoggingFile%
|
||||
} ; End of Function
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
AddToTotalVideosUploadedCount(){
|
||||
; IniRead, TotalVideosUploaded, %SettingsIniFilepath%, General, TotalVideosUploaded, %A_Space%
|
||||
TotalVideosUploaded += 1
|
||||
; IniWrite, %TotalVideosUploaded%, %SettingsIniFilepath%, General, TotalVideosUploaded
|
||||
}
|
||||
|
||||
|
||||
|
||||
OnMsgBoxPodcastFinish() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
WinMove,, 0
|
||||
}
|
||||
}
|
||||
|
||||
OnMsgBoxSocialMediaPoster() {
|
||||
DetectHiddenWindows, On
|
||||
Process, Exist
|
||||
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
|
||||
ControlSetText Button1, Yes
|
||||
ControlSetText Button2, Not Now
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Check_For_Stuck_Video_Upload(Index_Number, Upload_Status){
|
||||
if(A_index = 1){ ; Create a blank array
|
||||
ProgressStatusArray := []
|
||||
Return
|
||||
}
|
||||
|
||||
Message = Upload Status: %Upload_Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
|
||||
|
||||
; if we reached the last loop number:
|
||||
if(A_index = %Number_of_loops_to_Check_Upload_status%){
|
||||
Message = Upload Most Likely Failed: Video Hasn't Finished Uploading after 1 hour.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return "Failed"
|
||||
}
|
||||
|
||||
; If progress is still the same after a ten minute interval then error out
|
||||
if(HasVal(Array_Index_Num_of_Upload_StatusChecks, A_index)){ ; if current index is in Array of index numbers to check status during
|
||||
|
||||
; Send a notification message of upload status
|
||||
Message = Upload Status: %Upload_Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||
|
||||
; if current upload_status is in the array of values that are updated every 10 mins
|
||||
if(HasVal(ProgressStatusArray, Upload_Status)){
|
||||
Message = Upload Failed (E#4508)`nUpload Stuck at same point for 10 minutes. Stuck Status: %ProgressStatus%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
SaveDriverURLOFErrorPage()
|
||||
Return "Failed"
|
||||
}
|
||||
ProgressStatusArray.Push(Upload_Status) ; append current status to array
|
||||
}
|
||||
} ; end of func
|
||||
|
||||
|
||||
; Find the longest word in a string of words
|
||||
FindLongestWordInString(m, calloutNumber, pos, haystack, pattern){
|
||||
Global wordLength, longestWord
|
||||
|
||||
len := StrLen(m)
|
||||
|
||||
If ( len > wordLength )
|
||||
{
|
||||
wordLength := len
|
||||
longestWord := m
|
||||
|
||||
; MsgBox, %m%
|
||||
}
|
||||
}
|
||||
@@ -216,6 +216,9 @@ Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength
|
||||
Xpath = //input[@id='url-rumble']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=RumbleURL)
|
||||
|
||||
; Input Rumble URL
|
||||
Xpath = //input[@id='url-unauthorizedtv']
|
||||
Status := Selenium_LoopToSendValueToXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000,StringTextContent:=UnauthorizedTVURL)
|
||||
|
||||
; Soundcloud but actually LBRY Audio URL
|
||||
Xpath = //input[@id='url-lbry-audio']
|
||||
@@ -325,6 +328,9 @@ Sublime Indentation Reset
|
||||
Message = Input Complete! `nPlease Confirm and click Final "Save" Button on Podcast Page
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
|
||||
; Change GUI button from "Upload Podcast"
|
||||
GuiControl,,UploadPodcast, Podcast Uploaded
|
||||
|
||||
sleep, 5000
|
||||
|
||||
CurrentSite :=
|
||||
|
||||
@@ -25,13 +25,10 @@ if(SocialMediaDescription = ""){
|
||||
CreateDescriptionForSocialMedia()
|
||||
}
|
||||
|
||||
; Msgbox % "SocialMediaDescription: " SocialMediaDescription
|
||||
|
||||
SubmitDescriptionForDiscordVideosChannel:
|
||||
Message := "**" . VideoTitle . "**" . "`n" . SocialMediaDescription . "`n"
|
||||
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
||||
; Do this with an array!!
|
||||
;
|
||||
|
||||
if(BitChuteURL != "")
|
||||
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
|
||||
@@ -44,23 +41,18 @@ Message .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
Message .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
||||
/*
|
||||
if(OdyseeVideoURL != "")
|
||||
Message .= "[Odysee](<" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
Message .= "[Odysee Audio](<" . OdyseeAudioURL . ") \| "
|
||||
|
||||
*/
|
||||
if(RumbleURL != "")
|
||||
Message .= "[Rumble](<" . RumbleURL . ">) \| "
|
||||
|
||||
/*if(StreamanityURL != "" AND InStr(StreamanityURL, "streamanity.com"))
|
||||
Message .= "[Streamanity](<" . StreamanityURL . ">) \| "
|
||||
|
||||
*/
|
||||
if(DailyMotionURL != "")
|
||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">)"
|
||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
||||
|
||||
if(PodcastTranscriptURL != "")
|
||||
Message .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
||||
|
||||
if(PodcastNumber != "")
|
||||
Message .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||
|
||||
|
||||
UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
||||
|
||||
@@ -56,24 +56,20 @@ VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
VideoLinks .= "[Odysee \(Audio\)](" . OdyseeAudioURL . ") \| "
|
||||
/*
|
||||
if(OdyseeVideoURL != "")
|
||||
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
VideoLinks .= "[Odysee Audio](" . OdyseeAudioURL . ") \| "
|
||||
|
||||
*/
|
||||
if(RumbleURL != "")
|
||||
VideoLinks .= "[Rumble](" . RumbleURL . ") \| "
|
||||
/*
|
||||
if(InStr(StreamanityURL, "https://streamanity.com/video/"))
|
||||
VideoLinks .= "[Streamanity](" . StreamanityURL . ") \| "
|
||||
|
||||
*/
|
||||
if(DailyMotionURL != "")
|
||||
VideoLinks .= "[DailyMotion](" . DailyMotionURL . ") \| "
|
||||
|
||||
/*if(PodcastTranscriptURL != "")
|
||||
VideoLinks .= "[Video Transcript](" . PodcastTranscriptURL . ") \| "
|
||||
|
||||
*/
|
||||
if(PodcastNumber != "")
|
||||
VideoLinks .= "[FDRPodcasts](" . "https://fdrpodcasts.com/" . PodcastNumber . ") \| "
|
||||
|
||||
|
||||
TelegramMessage := TelegramVideoTitle . "`n" . TelegramBodymessage . "`n" . VideoLinks
|
||||
|
||||
@@ -83,86 +79,73 @@ StrLenOfMessageAndVideoLinks := StrLen(TelegramVideoTitle) + StrLen(TelegramBody
|
||||
; DevModeMsgBox(StrLenOfMessageAndVideoLinks)
|
||||
|
||||
|
||||
if(StrLenOfMessageAndVideoLinks > 1024){
|
||||
; Telegram SendMessage is limited to 4096 characters
|
||||
if(StrLenOfMessageAndVideoLinks < 4096){ ; split into sendphoto and 1 sendmessage
|
||||
; DevModeMsgBox("Less than 4096 chars")
|
||||
; Photo and Video Title go into SendPhoto
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
; If Length of Title, Video Links and Message is less than 1024 characters:
|
||||
; ------------------------------------------------
|
||||
if(StrLenOfMessageAndVideoLinks < 1024) {
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
||||
if(InStr(Status, "error_code")){
|
||||
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
; Video Description goes into TelegramMessage
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
; SaveOrPostProgress(Message:=Status,PostType:=",ErrorLoggingTextFile")
|
||||
Message = Telegram Error: %Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
} ; split into 2 SendMessages
|
||||
else if (StrLenOfMessageAndVideoLinks > 4096 AND StrLenOfMessageAndVideoLinks < 8192){ ; Split into 2 parts
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
ToolTip
|
||||
Return
|
||||
}
|
||||
}
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 4097, 8192)
|
||||
Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
; If Title, Links and Message are longer than 1024, but less than 4096, split into 2 pieces: sendphoto and sendmessage
|
||||
; ------------------------------------------------
|
||||
if(StrLenOfMessageAndVideoLinks < 4096){
|
||||
|
||||
} ; split into 3 sendMessages
|
||||
else if (StrLenOfMessageAndVideoLinks > 8192 AND StrLenOfMessageAndVideoLinks < 12288){ ; Split into 3 parts
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
; Photo and Video Title go into SendPhoto
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 1, 4096)
|
||||
msgbox % StrLen(TelegramBodymessagePiece)
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
; Video Description goes into TelegramMessage
|
||||
Status2 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessage)
|
||||
|
||||
} else, {
|
||||
; If Title, links and message are longer than 4096 chars, we need to split them into multiple messages
|
||||
; ------------------------------------------------
|
||||
TelegramVideoTitle := TelegramVideoTitle . "`n" . VideoLinks
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramVideoTitle ) ; you could add more options; compare the Telegram API docs
|
||||
|
||||
|
||||
; Split the Description into 4096 character chunks while preserving sentences
|
||||
; Used 4095 because a ". " has to be put in at the end of the chunk.
|
||||
VideoDescriptionChunks := SplitStringWithSentences(TelegramBodymessage, 4094)
|
||||
|
||||
|
||||
; go through array and post each chunk as new message
|
||||
Loop % VideoDescriptionChunks.Length(){
|
||||
; ArrayItem := ARRAY[A_Index]
|
||||
Description := VideoDescriptionChunks[A_Index]
|
||||
|
||||
|
||||
SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := Description)
|
||||
; Clipboard := Description
|
||||
; msgbox % Description
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
TelegramBodymessagePiece := SubStr(TelegramBodymessage, 4097, 8192)
|
||||
msgbox % StrLen(TelegramBodymessagePiece)
|
||||
DevModeMsgBox(TelegramBodymessagePiece)
|
||||
Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
}
|
||||
|
||||
; TelegramBodymessagePiece := SubStr(TelegramBodymessage, 8193, 12288)
|
||||
; Status3 := SendTelegramMessage(TelegramBotToken, TelegramBotChatID, text := TelegramBodymessagePiece)
|
||||
}
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||
|
||||
|
||||
} else, { ; if less than 1024 characters, send normally
|
||||
Status := SendTelegramPhoto(TelegramBotToken, TelegramBotChatID, VideoThumbFilepath, caption := TelegramMessage ) ; you could add more options; compare the Telegram API docs
|
||||
if(InStr(Status, "error_code")){
|
||||
Message = Telegram Post Failed due to an API Issue. Error was saved to ErrorLogging file. Please send it to Yuriy.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
; SaveOrPostProgress(Message:=Status,PostType:=",ErrorLoggingTextFile")
|
||||
Message = Telegram Error: %Status%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
|
||||
ToolTip
|
||||
Return
|
||||
}
|
||||
|
||||
}
|
||||
; Msgbox % "SizeOfCaption: " SizeOfCaption
|
||||
; SizeOfCaption := SizeOfCaption +
|
||||
; Message .= VideoLinks
|
||||
; msgbox % StrLen(VideoLinks)
|
||||
|
||||
; Message := StrReplace(Message, "`n", LineBreakChar) ; replace all new line characters with the global charater
|
||||
|
||||
; msgbox % StrLen(Message)
|
||||
; sleep, 2000
|
||||
|
||||
|
||||
; SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordVideos")
|
||||
|
||||
; SaveOrPostProgress(Message:="Video Links posted to #Videos Successfully.",PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
Message = Video Links Posted to Telegram Successfully
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
||||
GuiControl,, PostToTelegramButton, Telegram - Posted Successfully
|
||||
|
||||
|
||||
; sleep, 2000
|
||||
|
||||
|
||||
ToolTip
|
||||
CurrentSite :=
|
||||
Return
|
||||
; -------------------------------/Telegram-------------------------------
|
||||
ToolTip
|
||||
CurrentSite :=
|
||||
Return
|
||||
; -------------------------------/Telegram-------------------------------
|
||||
|
||||
0
New Text File.txt
Normal file
0
New Text File.txt
Normal file
@@ -71,6 +71,15 @@ You can select a different file in the main window if the auto selection does no
|
||||
`*.jpg` or `*.png` file which will be the thumbnail for your video/podcast<br>
|
||||
|
||||
|
||||
# LBRY Desktop Application `daemon_settings.yml`
|
||||
Due to LBRY being discontinued, the default daemon_settings that come with the LBRY Desktop application might no longer work for you due to the servers being offline.
|
||||
To fix this, add the Odysee server to the top of the list of `lbryum_servers` in the following file: `C:\Users\YOURUSERNAMEHERE\AppData\Local\lbry\lbrynet\daemon_settings.yml`
|
||||
```
|
||||
lbryum_servers:
|
||||
- a-hub1.odysee.com:50001
|
||||
- spv11.lbry.com:50001
|
||||
- spv19.lbry.com:50001
|
||||
```
|
||||
|
||||
|
||||
# Uncaught Errors
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[Video-Uploader]
|
||||
Version=3.33
|
||||
Version=3.36
|
||||
Name=Freedomain Video Uploader
|
||||
|
||||
Reference in New Issue
Block a user