From cd549a72c9540a5c4431a0eeaf9ee58483e86bd4 Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 8 Jul 2023 09:42:57 +0800 Subject: [PATCH] Fix MediaInfo Logging issue --- TVRename/Utility/Helper/FileHelper.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TVRename/Utility/Helper/FileHelper.cs b/TVRename/Utility/Helper/FileHelper.cs index 64a08d75..920741d0 100644 --- a/TVRename/Utility/Helper/FileHelper.cs +++ b/TVRename/Utility/Helper/FileHelper.cs @@ -426,6 +426,11 @@ public static string UrlPathFullName(this FileInfo baseFile) private static int GetMetaDetails(this FileInfo movieFile, Func extractMethod, Func parseMethod, string operation, Func meExtractMethod, Func meParseMethod) { + if (!movieFile.Exists) + { + Logger.Warn($"Unable to find file as part of {operation} for {movieFile.FullName}"); + return -1; + } try { string duration;