Fixed: Incorrectly treating single episode releases as full season releases
This commit is contained in:
parent
80b2e605a9
commit
a5a02ce90e
|
@ -106,6 +106,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
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 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
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 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
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 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
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 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
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 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
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 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -336,7 +336,8 @@ namespace NzbDrone.Core.Parser
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue