diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index 8ac33d3f5..c00181c7e 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -506,14 +506,62 @@ namespace Emby.Naming.Common Token = "-short", MediaType = MediaType.Video }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.BehindTheScenes, Token = "behind the scenes" }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.DeletedScene, Token = "deleted scenes" }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.Interview, Token = "interviews" }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.Scene, Token = "scenes" }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.Sample, Token = "samples" }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.Clip, Token = "shorts" }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.Clip, Token = "featurettes" }, - new ExtraRule { RuleType = ExtraRuleType.DirectoryName, MediaType = MediaType.Video, ExtraType = ExtraType.Unknown, Token = "extras" }, + new ExtraRule + { + ExtraType = ExtraType.BehindTheScenes, + RuleType = ExtraRuleType.DirectoryName, + Token = "behind the scenes", + MediaType = MediaType.Video, + }, + new ExtraRule + { + ExtraType = ExtraType.DeletedScene, + RuleType = ExtraRuleType.DirectoryName, + Token = "deleted scenes", + MediaType = MediaType.Video, + }, + new ExtraRule + { + ExtraType = ExtraType.Interview, + RuleType = ExtraRuleType.DirectoryName, + Token = "interviews", + MediaType = MediaType.Video, + }, + new ExtraRule + { + ExtraType = ExtraType.Scene, + RuleType = ExtraRuleType.DirectoryName, + Token = "scenes", + MediaType = MediaType.Video, + }, + new ExtraRule + { + ExtraType = ExtraType.Sample, + RuleType = ExtraRuleType.DirectoryName, + Token = "samples", + MediaType = MediaType.Video, + }, + new ExtraRule + { + ExtraType = ExtraType.Clip, + RuleType = ExtraRuleType.DirectoryName, + Token = "shorts", + MediaType = MediaType.Video, + }, + new ExtraRule + { + ExtraType = ExtraType.Clip, + RuleType = ExtraRuleType.DirectoryName, + Token = "featurettes", + MediaType = MediaType.Video, + }, + new ExtraRule + { + ExtraType = ExtraType.Unknown, + RuleType = ExtraRuleType.DirectoryName, + Token = "extras", + MediaType = MediaType.Video, + }, }; Format3DRules = new[] diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index cfc80ac09..a52ac3671 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1327,7 +1327,7 @@ namespace MediaBrowser.Controller.Entities } // Use some hackery to get the extra type based on foldername - item.ExtraType = Enum.TryParse(extraFolderName.Replace(" ", ""), true, out ExtraType extraType) + item.ExtraType = Enum.TryParse(extraFolderName.Replace(" ", string.Empty), true, out ExtraType extraType) ? extraType : Model.Entities.ExtraType.Unknown;