diff --git a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs index 7686d8d87..7da18d33d 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParserFixture.cs @@ -106,6 +106,7 @@ public void ParseTitle_single(string postTitle, string title, int seasonNumber, result.EpisodeNumbers.First().Should().Be(episodeNumber); result.SeriesTitle.Should().Be(title.CleanSeriesTitle()); result.AbsoluteEpisodeNumbers.Should().BeEmpty(); + result.FullSeason.Should().BeFalse(); } [TestCase(@"z:\tv shows\battlestar galactica (2003)\Season 3\S03E05 - Collaborators.mkv", 3, 5)] @@ -129,6 +130,8 @@ public void PathParse_tests(string path, int season, int episode) result.EpisodeNumbers.Should().HaveCount(1); result.SeasonNumber.Should().Be(season); result.EpisodeNumbers[0].Should().Be(episode); + result.AbsoluteEpisodeNumbers.Should().BeEmpty(); + result.FullSeason.Should().BeFalse(); ExceptionVerification.IgnoreWarns(); } @@ -169,6 +172,8 @@ public void TitleParse_multi(string postTitle, string title, int season, int[] e result.SeasonNumber.Should().Be(season); result.EpisodeNumbers.Should().BeEquivalentTo(episodes); result.SeriesTitle.Should().Be(title.CleanSeriesTitle()); + result.AbsoluteEpisodeNumbers.Should().BeEmpty(); + result.FullSeason.Should().BeFalse(); } @@ -190,6 +195,8 @@ public void parse_daily_episodes(string postTitle, string title, int year, int m result.SeriesTitle.Should().Be(title.CleanSeriesTitle()); result.AirDate.Should().Be(airDate.ToString(Episode.AIR_DATE_FORMAT)); result.EpisodeNumbers.Should().BeEmpty(); + result.AbsoluteEpisodeNumbers.Should().BeEmpty(); + result.FullSeason.Should().BeFalse(); } [TestCase("[SubDESU]_High_School_DxD_07_(1280x720_x264-AAC)_[6B7FD717]", "High School DxD", 7, 0, 0)] @@ -222,9 +229,9 @@ public void parse_absolute_numbers(string postTitle, string title, int absoluteE result.SeasonNumber.Should().Be(seasonNumber); result.EpisodeNumbers.FirstOrDefault().Should().Be(episodeNumber); result.SeriesTitle.Should().Be(title.CleanSeriesTitle()); + result.FullSeason.Should().BeFalse(); } - [TestCase("Conan {year} {month} {day} Emma Roberts HDTV XviD BFF")] [TestCase("The Tonight Show With Jay Leno {year} {month} {day} 1080i HDTV DD5 1 MPEG2 TrollHD")] [TestCase("The.Daily.Show.{year}.{month}.{day}.Johnny.Knoxville.iTouch-MW")] @@ -238,7 +245,6 @@ public void should_not_accept_ancient_daily_series(string title) Parser.Parser.ParseTitle(yearTooLow).Should().BeNull(); } - [TestCase("Conan {year} {month} {day} Emma Roberts HDTV XviD BFF")] [TestCase("The Tonight Show With Jay Leno {year} {month} {day} 1080i HDTV DD5 1 MPEG2 TrollHD")] [TestCase("The.Daily.Show.{year}.{month}.{day}.Johnny.Knoxville.iTouch-MW")] @@ -274,7 +280,8 @@ public void full_season_release_parse(string postTitle, string title, int season var result = Parser.Parser.ParseTitle(postTitle); result.SeasonNumber.Should().Be(season); result.SeriesTitle.Should().Be(title.CleanSeriesTitle()); - result.EpisodeNumbers.Length.Should().Be(0); + result.EpisodeNumbers.Should().BeEmpty(); + result.AbsoluteEpisodeNumbers.Should().BeEmpty(); result.FullSeason.Should().BeTrue(); } diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index c0618bb5b..593e349d9 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -336,7 +336,8 @@ private static ParsedEpisodeInfo ParseMatchCollection(MatchCollection matchColle var count = last - first + 1; result.AbsoluteEpisodeNumbers = Enumerable.Range(first, count).ToArray(); } - else + + if (!episodeCaptures.Any() && !absoluteEpisodeCaptures.Any()) { //Check to see if this is an "Extras" or "SUBPACK" release, if it is, return NULL //Todo: Set a "Extras" flag in EpisodeParseResult if we want to download them ever