From a7164c0902d0d13a26ccfba12ea2381cac529406 Mon Sep 17 00:00:00 2001 From: Yuriy Date: Sun, 2 Apr 2023 21:52:02 -0400 Subject: [PATCH] fixed LBRY API thumbnails not working --- .gitignore | 3 ++- Freedomain Video Uploader.ahk | 13 ++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8ba44f0..33bcfcf 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ body.txt **ConnectToActiveChromeTab.ahk Freedomain Social Media Poster*.exe Compile Scripts to EXE.ahk -Freedomain Video Uploader.exe \ No newline at end of file +Freedomain Video Uploader.exe +Lib/LBRY Process Killer.exe \ No newline at end of file diff --git a/Freedomain Video Uploader.ahk b/Freedomain Video Uploader.ahk index b8cd91d..7c3b7af 100644 --- a/Freedomain Video Uploader.ahk +++ b/Freedomain Video Uploader.ahk @@ -4122,6 +4122,9 @@ Return ; -------------------------------LBRY------------------------------- LBRYVideoUpload: LBRYAudioUpload: + + + if(LBRYUploadType = "Video"){ CurrentSite := "LBRY Video" IniRead, LBRYPermanentURL, %VideoLinksIniFile%, Misc, LBRYVideoPermanentURL, %A_Space% @@ -4214,19 +4217,27 @@ Loop % KeywordsArray.Length(){ SplitPath, VideoThumbFilepath, ThumbnailFileNameWExt, OutDir, OutExtension, OutNameNoExt, OutDrive -FDRThumbnailURL = +FDRThumbnailURL = https://cdn.freedomainradio.com/%ThumbnailFileNameWExt% message = FDRThumbnailURL: %FDRThumbnailURL% SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,DiscordErrorLogging") + ; Msgbox % "FDRThumbnailURL: " FDRThumbnailURL ; Create API Command and save it to variable LBRYAPICommand = "%LBRYNetFilepath%" publish --name="%LBRYURLSlug%" --bid="%LBRYNewVideoStakeAmount%" --file_path="%FilePathForLBRYAPI%" --title="%LBRYVideoTitle%" --description="%LBRYVideoDescription%" %LBRYTags% --thumbnail_url="%FDRThumbnailURL%" --channel_id="%LBRYChannelID%" + ; LogErrorToTextFile(LBRYAPICommand) ; Log to file LogErrorToTextFile("LBRYAPICommand: " LBRYAPICommand) ; Parse returned API json for success status UploadResult := StdOutToVar(LBRYAPICommand) + + + + + + if(InStr(UploadResult, "Could not connect")){ Message = Upload Failed. Reason: %UploadResult% SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")