diff options
| author | Stepan <ste.martinek+git@gmail.com> | 2020-11-02 20:03:12 +0100 |
|---|---|---|
| committer | Stepan <ste.martinek+git@gmail.com> | 2020-11-02 20:03:12 +0100 |
| commit | 1e7177568887d0f808660454e5eb7ca7ebcd6998 (patch) | |
| tree | 0359804e2c4d691a7cf476c7364cefded0ab2947 /Emby.Naming/Common | |
| parent | 50a2ef9d8aaf92e8b69ced5ea2fcc8fa185fe675 (diff) | |
Add Name and Year parsing for audiobooks
Diffstat (limited to 'Emby.Naming/Common')
| -rw-r--r-- | Emby.Naming/Common/NamingOptions.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index 537de63d55..5bf232451b 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -575,6 +575,13 @@ namespace Emby.Naming.Common @"dis(?:c|k)[\s_-]?(?<chapter>[0-9]+)" }; + AudioBookNamesExpressions = new[] + { + // Detect year usually in brackets after name Batman (2020) + @"^(?<name>.+?)\s*\(\s*(?<year>\d{4})\s*\)\s*$", + @"^\s*(?<name>.+?)\s*$" + }; + var extensions = VideoFileExtensions.ToList(); extensions.AddRange(new[] @@ -658,6 +665,8 @@ namespace Emby.Naming.Common public string[] AudioBookPartsExpressions { get; set; } + public string[] AudioBookNamesExpressions { get; set; } + public StubTypeRule[] StubTypes { get; set; } public char[] VideoFlagDelimiters { get; set; } |
