|
|
|
@ -16,46 +16,67 @@ if(DiscordVideosWebhookURL = ""){
|
|
|
|
|
; https://stackoverflow.com/questions/63160401/how-to-create-hyperlink-in-discord-in-an-embed-in-general
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message :=
|
|
|
|
|
VideoLinks :=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 != "")
|
|
|
|
|
Message .= "[BitChute](<" . 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 != "")
|
|
|
|
|
Message .= "[Brighteon](<" . 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%
|
|
|
|
|