added Aspect Ratio check for Brighteon, and set brighteon check status appropriately, added video info to errorlog

main
Yuriy 3 months ago
parent f5ffe32766
commit d1e471bd26

@ -310,8 +310,14 @@ Loop, files, %VideoFolderDir%\*.*, F ; loop through the files in the director
FileGetSize, VideoFileSizeInMB, %A_LoopFileFullPath%, M
VideoInfoObj := Filexpro(VideoFilepath,
, "System.Video.TotalBitrate" )
VideoTotalBitrate := VideoInfoObj["System.Video.TotalBitrate"]
, "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)
}
@ -355,6 +361,8 @@ Loop, files, %VideoFolderDir%\*.mp3, F ; loop through the files in the direct
}
;---Read Info From Previous Run And Set Upload Options---
;--------------------------------------------------------
VideoLinksIniFile = %VideoFolderDir%\VideoLinks.ini
@ -446,6 +454,11 @@ if(VideoFileSizeInMB > 6144){
Brighteon := 0
}
; Brighteon will fail if video does not have one of the following aspect ratios
BrighteonAcceptedAspectRatios := ["4:3","3:4","16:9","9:16"]
; Msgbox % "VideoAspectRatio: " VideoAspectRatio
VideoHasBrighteonCompatibleAspectRatio := HasVal(BrighteonAcceptedAspectRatios, VideoAspectRatio)
; Override Website statuses if this is a schedule post based on Argument3
; ------------------------------------------------
@ -731,6 +744,9 @@ SaveOrPostProgress(Message:=Message,PostType:=",ErrorLoggingTextFile")
Message := "TotalVideosUploaded: " TotalVideosUploaded
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
JSVideoTitle := FormatTextToJSText(VideoTitle)
JSVideoDescription := FormatTextToJSText(VideoDescription)

@ -279,11 +279,16 @@ Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vOdyseeAudio Checked%O
Gui, Add, Checkbox, x%GroupBoxCheckboxPos% y+%MarginSize% vRumble Checked%Rumble% gUpdateVars, Rumble
if(VideoTotalBitrate > 300000)
Gui, Add, Checkbox, vBrighteon y+%MarginSize% Checked%Brighteon% gUpdateVars, Brighteon
else,{
; Brighteon Does not accept videos lower than 300kbps or that don't have the appropriate aspect ratio
if(VideoTotalBitrate < 300000 OR !VideoHasBrighteonCompatibleAspectRatio){
if(!VideoHasBrighteonCompatibleAspectRatio)
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Aspect Ratio is %VideoAspectRatio%)
else,
Gui, Add, Checkbox, cRed vBrighteon y+%MarginSize% Checked0 gUpdateVars, Brighteon (Bitrate Below 300kbps)
}
else,{
Gui, Add, Checkbox, vBrighteon y+%MarginSize% Checked%Brighteon% gUpdateVars, Brighteon
}
Gui, Add, Checkbox, vDailyMotion y+%MarginSize% Checked%DailyMotion% gUpdateVars, DailyMotion

@ -1,3 +1,3 @@
[Video-Uploader]
Version=3.39
Version=3.40
Name=Freedomain Video Uploader

Loading…
Cancel
Save