Do not assign an invalid value of zero to ExtraType

This commit is contained in:
Mark Monteiro 2020-03-28 13:54:14 +01:00
parent 5fcbedc194
commit ea306e8f6d

View File

@ -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;