Releases with only extras will be skipped, with tests.

pull/7/merge
Mark McDowall 13 years ago
parent 4604bbd821
commit 339f191ab8

@ -352,5 +352,15 @@ namespace NzbDrone.Core.Test
result.Should().Be(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();
}
} }
} }

@ -44,7 +44,7 @@ namespace NzbDrone.Core
RegexOptions.IgnoreCase | RegexOptions.Compiled), RegexOptions.IgnoreCase | RegexOptions.Compiled),
//Supports Season only releases //Supports Season only releases
new Regex(@"^(?<title>.+?)\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) RegexOptions.IgnoreCase | RegexOptions.Compiled)
}; };
@ -135,6 +135,11 @@ namespace NzbDrone.Core
else 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; parsedEpisode.FullSeason = true;
} }
} }

Loading…
Cancel
Save