Skip to content

Commit

Permalink
set null if id is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
DineshSolanki committed Aug 22, 2021
1 parent 96cab25 commit fe9181a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FoliCon/Modules/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fe9181a

Please sign in to comment.