diff --git a/NzbDrone.Core.Test/ParserTest.cs b/NzbDrone.Core.Test/ParserTest.cs index 10acb3b2b..20d599a8d 100644 --- a/NzbDrone.Core.Test/ParserTest.cs +++ b/NzbDrone.Core.Test/ParserTest.cs @@ -352,5 +352,15 @@ public void parse_size(string sizeString, long expectedSize) result.Should().Be(expectedSize); } + + [TestCase("Acropolis Now S05 EXTRAS DVDRip XviD RUNNER")] + [TestCase("Punky Brewster S01 EXTRAS DVDRip XviD RUNNER")] + [TestCase("Instant Star S03 EXTRAS DVDRip XviD OSiTV")] + public void parse_season_extras(string postTitle) + { + var result = Parser.ParseTitle(postTitle); + + result.Should().BeNull(); + } } } \ No newline at end of file diff --git a/NzbDrone.Core/Parser.cs b/NzbDrone.Core/Parser.cs index f3e57d506..25279b3f5 100644 --- a/NzbDrone.Core/Parser.cs +++ b/NzbDrone.Core/Parser.cs @@ -44,7 +44,7 @@ public static class Parser RegexOptions.IgnoreCase | RegexOptions.Compiled), //Supports Season only releases - new Regex(@"^(?.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))+\W?(?!\\)", + new Regex(@"^(?<title>.+?)\W(?:S|Season)\W?(?<season>\d{1,2}(?!\d+))\W(?<extras>EXTRAS)?(?!\\)", RegexOptions.IgnoreCase | RegexOptions.Compiled) }; @@ -135,6 +135,11 @@ internal static EpisodeParseResult ParseTitle(string title) else { + //Check to see if this is an "Extras" pack, if it is, return NULL + //Todo: Set a "Extras" flag in EpisodeParseResult if we want to download them ever + if (!String.IsNullOrEmpty(match[0].Groups["extras"].Value)) + return null; + parsedEpisode.FullSeason = true; } }