Browse Source

remove explicit ‘-‘ support in series name

Cody Engel 2 months ago
parent
commit
bd9a44ce7d

+ 1 - 1
Emby.Naming/TV/SeriesResolver.cs

@@ -21,7 +21,7 @@ namespace Emby.Naming.TV
         /// Regex that matches titles with year in parentheses, optionally preceded by a minus sign.
         /// Captures the title (which may be numeric) before the year.
         /// </summary>
-        [GeneratedRegex(@"^-?(?<title>.+?)\s*\(\d{4}\)")]
+        [GeneratedRegex(@"(?<title>.+?)\s*\(\d{4}\)")]
         private static partial Regex TitleWithYearRegex();
 
         /// <summary>

+ 0 - 1
tests/Jellyfin.Naming.Tests/TV/SeriesResolverTests.cs

@@ -20,7 +20,6 @@ namespace Jellyfin.Naming.Tests.TV
         [InlineData("/some/path/The Show s02e10 720p hdtv", "The Show")]
         [InlineData("/some/path/The Show s02e10 the episode 720p hdtv", "The Show")]
         [InlineData("/some/path/1923 (2022)", "1923")]
-        [InlineData("/some/path/-1923 (2022)", "1923")]
         public void SeriesResolverResolveTest(string path, string name)
         {
             var res = SeriesResolver.Resolve(_namingOptions, path);