From fe9181a92dd3e093a515eca4b4c370352988f883 Mon Sep 17 00:00:00 2001 From: Dinesh Solanki <15937452+DineshSolanki@users.noreply.github.com> Date: Sun, 22 Aug 2021 11:43:20 +0530 Subject: [PATCH] set null if id is empty --- FoliCon/Modules/Util.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FoliCon/Modules/Util.cs b/FoliCon/Modules/Util.cs index 1971360e..7ef59871 100644 --- a/FoliCon/Modules/Util.cs +++ b/FoliCon/Modules/Util.cs @@ -621,6 +621,11 @@ public static (string ID, string MediaType) ReadMediaInfo(string folderPath) var filePath = Path.Combine(folderPath, GlobalVariables.MediaInfoFile); var id = File.Exists(filePath) ? InIHelper.ReadValue("ID", null, filePath) : null; var mediaType = File.Exists(filePath) ? InIHelper.ReadValue("MediaType", null, filePath) : null; + if (string.IsNullOrWhiteSpace(id)) + { + id = null; + mediaType = null; + } var mediaInfo = (ID: id, MediaType: mediaType); return mediaInfo; }