check Bitchute URl and Brighteon URL for processing status and skip them in Discord + Telegram if still processing
This commit is contained in:
@@ -16,46 +16,67 @@ if(DiscordVideosWebhookURL = ""){
|
||||
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
||||
|
||||
|
||||
Message :=
|
||||
VideoLinks :=
|
||||
|
||||
if(BitChuteURL != "")
|
||||
Message .= "[BitChute](<" . BitChuteURL . ">) \| "
|
||||
|
||||
if(BrighteonURL != "")
|
||||
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 != "")
|
||||
Message .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||
VideoLinks .= "[Odysee](<" . OdyseeVideoURL . ">) \| "
|
||||
|
||||
if(OdyseeAudioURL != "")
|
||||
Message .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
||||
VideoLinks .= "[Odysee (Audio)](<" . OdyseeAudioURL . ">) \| "
|
||||
|
||||
if(RumbleURL != "")
|
||||
Message .= "[Rumble](<" . RumbleURL . ">) \| "
|
||||
VideoLinks .= "[Rumble](<" . RumbleURL . ">) \| "
|
||||
|
||||
if(DailyMotionURL != "")
|
||||
Message .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
||||
VideoLinks .= "[DailyMotion](<" . DailyMotionURL . ">) \| "
|
||||
|
||||
if(PodcastTranscriptURL != "")
|
||||
Message .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
||||
VideoLinks .= "[Video Transcript](<" . PodcastTranscriptURL . ">) \| "
|
||||
|
||||
if(PodcastNumber != "")
|
||||
Message .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||
VideoLinks .= "[FDRPodcasts](<" . "https://fdrpodcasts.com/" . PodcastNumber . ">) \| "
|
||||
|
||||
|
||||
; StrLenOfDiscordMessage :=
|
||||
|
||||
; trim the video description if Title + Body + Links is longer than 2000 chars
|
||||
if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(Message)) > 2000){
|
||||
if((StrLen(VideoTitle) + StrLen(VideoDescription) + StrLen(VideoLinks)) > 2000){
|
||||
|
||||
DiscordAPICharsLeft := 2000 - StrLen(VideoTitle) - StrLen(Message) - 15
|
||||
DiscordAPICharsLeft := 2000 - StrLen(VideoTitle) - StrLen(VideoLinks) - 15
|
||||
|
||||
DiscordVideoDescription := SubStr(VideoDescription, 1, DiscordAPICharsLeft) . "..."
|
||||
}
|
||||
else,
|
||||
DiscordVideoDescription := VideoDescription
|
||||
|
||||
Message := "**" . VideoTitle . "**" . "`n" . Message . "`n" . DiscordVideoDescription
|
||||
Message := "**" . VideoTitle . "**" . "`n" . VideoLinks . "`n" . DiscordVideoDescription
|
||||
|
||||
Status := UploadImageToDiscord(DiscordVideosWebhookURL, Message, VideoThumbFilepath)
|
||||
Message = API Response:`n%Status%
|
||||
|
||||
@@ -45,11 +45,31 @@ TelegramBodymessage := ASCIISTRReplace(VideoDescription)
|
||||
|
||||
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 != "")
|
||||
VideoLinks .= "[Odysee](" . OdyseeVideoURL . ") \| "
|
||||
|
||||
Reference in New Issue
Block a user