diff --git a/NzbDrone.Core.Test/ParserFixture/ParserTest.cs b/NzbDrone.Core.Test/ParserFixture/ParserTest.cs index bd53c5699..b7cdfbebc 100644 --- a/NzbDrone.Core.Test/ParserFixture/ParserTest.cs +++ b/NzbDrone.Core.Test/ParserFixture/ParserTest.cs @@ -72,6 +72,10 @@ namespace NzbDrone.Core.Test.ParserFixture [TestCase("Top Gear - 07x03 - 2005.11.70", "Top Gear", 7, 3)] [TestCase("Hatfields and McCoys 2012 Part 1 REPACK 720p HDTV x264 2HD", "Hatfields and McCoys 2012", 1, 1)] [TestCase("Glee.S04E09.Swan.Song.1080p.WEB-DL.DD5.1.H.264-ECI", "Glee", 4, 9)] + [TestCase("S08E20 50-50 Carla [DVD]", "", 8, 20)] + [TestCase("Cheers S08E20 50-50 Carla [DVD]", "Cheers", 8, 20)] + [TestCase("S02E10 6-50 to SLC [SDTV]", "", 2, 10)] + [TestCase("Franklin & Bash S02E10 6-50 to SLC [SDTV]", "Franklin & Bash", 2, 10)] public void ParseTitle_single(string postTitle, string title, int seasonNumber, int episodeNumber) { var result = Parser.ParseTitle(postTitle); diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs index 467259c78..b39abbeff 100644 --- a/NzbDrone.Core/Parser.cs +++ b/NzbDrone.Core/Parser.cs @@ -30,7 +30,7 @@ namespace NzbDrone.Core RegexOptions.IgnoreCase | RegexOptions.Compiled), //Episodes without a title, Single (S01E05, 1x05) AND Multi (S01E04E05, 1x04x05, etc) - new Regex(@"^(?:S?(?(?\d{2}(?!\d+)))+\W*)+\W?(?!\\)", + new Regex(@"^(?:S?(?(?\d{2}(?!\d+)))+)\W?(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled), //Episodes with a title, Single episodes (S01E05, 1x05, etc) & Multi-episode (S01E05E06, S01E05-06, S01E05 E06, etc)