From ea306e8f6d28e4c4acb78ee7208508d329473414 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Sat, 28 Mar 2020 13:54:14 +0100 Subject: [PATCH] Do not assign an invalid value of zero to ExtraType --- MediaBrowser.Controller/Entities/BaseItem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 2a941a684..66917e442 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1327,8 +1327,9 @@ namespace MediaBrowser.Controller.Entities } // Use some hackery to get the extra type based on foldername - Enum.TryParse(extraFolderName.Replace(" ", ""), true, out ExtraType extraType); - item.ExtraType = extraType; + item.ExtraType = Enum.TryParse(extraFolderName.Replace(" ", ""), true, out ExtraType extraType) + ? extraType + : (ExtraType?)null; return item;