@ -108,6 +108,7 @@ Array_Index_Num_of_Upload_StatusChecks := [144,288,432, 576,720,864]
; Check if Lib folder exists and create it if not
; Check if Lib folder exists and create it if not
LibFolder := A_ScriptDir . "\Lib"
LibFolder := A_ScriptDir . "\Lib"
ErrorLoggingFolder := A_ScriptDir . "\Lib\ErrorLogging"
ErrorLoggingFolder := A_ScriptDir . "\Lib\ErrorLogging"
if(!FileExist(ErrorLoggingFolder))
FileCreateDir, %ErrorLoggingFolder%
FileCreateDir, %ErrorLoggingFolder%
; Set filepaths for different files and folders
; Set filepaths for different files and folders
@ -399,19 +400,18 @@ if(FileExist(VideoLinksIniFile)){
IniRead, UnauthorizedTVURL, %VideoLinksIniFile%, URLs, UnauthorizedTVURL, %A_Space%
IniRead, UnauthorizedTVURL, %VideoLinksIniFile%, URLs, UnauthorizedTVURL, %A_Space%
; MISC
; Misc Info
; ------------------------------------------------
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
IniRead, ErrorLoggingFilePath, %VideoLinksIniFile%, Misc, ErrorLoggingFilePath, %A_Space%
; Double check that the file/directory exists and create if not
; I don't remember why I added this, commenting this out on 2024/06/22 for now
SplitPath, ErrorLoggingFilePath,, ErrorLogDir
; IniRead, TempVideoThumbFilepath, %VideoLinksIniFile%, Misc, VideoThumbFilepath, %A_Space%
if(!FileExist(ErrorLogDir)){
/* if(TempVideoThumbFilepath){ ; if Video Thumbnail was saved in last run, overwrite variable path that was grabbed in the file loop above
FileCreateDir, %ErrorLogDir%
VideoThumbFilepath := TempVideoThumbFilepath
}
}
*/
}
}
; Create a directory for errorlogging if this is the first time working on this project
; Create a directory for errorlogging if this is the first time working on this project
if(ErrorLoggingFilePath = ""){
if(ErrorLoggingFilePath = ""){
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
FormatTime, TodayDate , YYYYMMDDHH24MISS, yyyyMMdd_hhmmss
@ -627,11 +627,25 @@ IniWrite, %YPosition%, %SettingsIniFilepath%, General, YPosition
Gui, Submit, NoHide
Gui, Submit, NoHide
if(VideoFilepath = ""){
Msgbox,4096,Error,No Video Filepath Found.`nPlease Input Video Filepath to Upload a Video.
; Double Check Files and Show Errors if there are any Issues
; In case the project files change between the time the gui was created and the Upload button is clicked
; ------------------------------------------------
(VideoFilepath = "")?(DoubleCheckErrorMessage .= "Video Filepath is BLANK`n"):()
(!FileExist(VideoFilepath))?(DoubleCheckErrorMessage .= "Video Filepath Points to a Non-Existing File`n"):()
(VideoThumbFilepath = "")?(DoubleCheckErrorMessage .= "Thumbnail Filepath is BLANK`n"):()
(!FileExist(VideoThumbFilepath))?(DoubleCheckErrorMessage .= "Thumbnail Filepath Points to a Non-Existing File`n"):()
if(DoubleCheckErrorMessage){
Message = Issue found when double checking files:`n%DoubleCheckErrorMessage%
SaveOrPostProgress(Message,PostType:="ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
Msgbox,4096,Error,%DoubleCheckErrorMessage%
Return
Return
}
}
; Destroy GUI after checking everything is working
; Destroy GUI after checking everything is working
Gui, Destroy
Gui, Destroy