diff options
Diffstat (limited to 'Emby.Naming/Common/NamingOptions.cs')
| -rw-r--r-- | Emby.Naming/Common/NamingOptions.cs | 145 |
1 files changed, 70 insertions, 75 deletions
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index c0be0b7c6..eb211050f 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -411,6 +411,66 @@ namespace Emby.Naming.Common MediaType.Video), new ExtraRule( + ExtraType.ThemeVideo, + ExtraRuleType.DirectoryName, + "backdrops", + MediaType.Video), + + new ExtraRule( + ExtraType.ThemeSong, + ExtraRuleType.DirectoryName, + "theme-music", + MediaType.Audio), + + new ExtraRule( + ExtraType.BehindTheScenes, + ExtraRuleType.DirectoryName, + "behind the scenes", + MediaType.Video), + + new ExtraRule( + ExtraType.DeletedScene, + ExtraRuleType.DirectoryName, + "deleted scenes", + MediaType.Video), + + new ExtraRule( + ExtraType.Interview, + ExtraRuleType.DirectoryName, + "interviews", + MediaType.Video), + + new ExtraRule( + ExtraType.Scene, + ExtraRuleType.DirectoryName, + "scenes", + MediaType.Video), + + new ExtraRule( + ExtraType.Sample, + ExtraRuleType.DirectoryName, + "samples", + MediaType.Video), + + new ExtraRule( + ExtraType.Clip, + ExtraRuleType.DirectoryName, + "shorts", + MediaType.Video), + + new ExtraRule( + ExtraType.Clip, + ExtraRuleType.DirectoryName, + "featurettes", + MediaType.Video), + + new ExtraRule( + ExtraType.Unknown, + ExtraRuleType.DirectoryName, + "extras", + MediaType.Video), + + new ExtraRule( ExtraType.Trailer, ExtraRuleType.Filename, "trailer", @@ -471,24 +531,12 @@ namespace Emby.Naming.Common MediaType.Video), new ExtraRule( - ExtraType.ThemeVideo, - ExtraRuleType.DirectoryName, - "backdrops", - MediaType.Video), - - new ExtraRule( ExtraType.ThemeSong, ExtraRuleType.Filename, "theme", MediaType.Audio), new ExtraRule( - ExtraType.ThemeSong, - ExtraRuleType.DirectoryName, - "theme-music", - MediaType.Audio), - - new ExtraRule( ExtraType.Scene, ExtraRuleType.Suffix, "-scene", @@ -537,54 +585,16 @@ namespace Emby.Naming.Common MediaType.Video), new ExtraRule( - ExtraType.BehindTheScenes, - ExtraRuleType.DirectoryName, - "behind the scenes", - MediaType.Video), - - new ExtraRule( - ExtraType.DeletedScene, - ExtraRuleType.DirectoryName, - "deleted scenes", - MediaType.Video), - - new ExtraRule( - ExtraType.Interview, - ExtraRuleType.DirectoryName, - "interviews", - MediaType.Video), - - new ExtraRule( - ExtraType.Scene, - ExtraRuleType.DirectoryName, - "scenes", - MediaType.Video), - - new ExtraRule( - ExtraType.Sample, - ExtraRuleType.DirectoryName, - "samples", - MediaType.Video), - - new ExtraRule( - ExtraType.Clip, - ExtraRuleType.DirectoryName, - "shorts", - MediaType.Video), - - new ExtraRule( - ExtraType.Clip, - ExtraRuleType.DirectoryName, - "featurettes", - MediaType.Video), - - new ExtraRule( ExtraType.Unknown, - ExtraRuleType.DirectoryName, - "extras", + ExtraRuleType.Suffix, + "-extra", MediaType.Video) }; + AllExtrasTypesFolderNames = VideoExtraRules + .Where(i => i.RuleType == ExtraRuleType.DirectoryName) + .ToDictionary(i => i.Token, i => i.ExtraType, StringComparer.OrdinalIgnoreCase); + Format3DRules = new[] { // Kodi rules: @@ -673,6 +683,10 @@ namespace Emby.Naming.Common ".mxf" }); + VideoFileExtensions = extensions + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToArray(); + MultipleEpisodeExpressions = new[] { @".*(\\|\/)[sS]?(?<seasonnumber>[0-9]{1,4})[xX](?<epnumber>[0-9]{1,3})((-| - )[0-9]{1,4}[eExX](?<endingepnumber>[0-9]{1,3}))+[^\\\/]*$", @@ -690,25 +704,6 @@ namespace Emby.Naming.Common IsNamed = true }).ToArray(); - VideoFileExtensions = extensions - .Distinct(StringComparer.OrdinalIgnoreCase) - .ToArray(); - - AllExtrasTypesFolderNames = new Dictionary<string, ExtraType>(StringComparer.OrdinalIgnoreCase) - { - ["trailers"] = ExtraType.Trailer, - ["theme-music"] = ExtraType.ThemeSong, - ["backdrops"] = ExtraType.ThemeVideo, - ["extras"] = ExtraType.Unknown, - ["behind the scenes"] = ExtraType.BehindTheScenes, - ["deleted scenes"] = ExtraType.DeletedScene, - ["interviews"] = ExtraType.Interview, - ["scenes"] = ExtraType.Scene, - ["samples"] = ExtraType.Sample, - ["shorts"] = ExtraType.Clip, - ["featurettes"] = ExtraType.Clip - }; - Compile(); } |
