mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Removed ParseSeasonInfo.
ParseEpisodeInfo will mark a report as a full season if no episodes are found, but was matched. Fixed tests that were affected by REGEX changes.
This commit is contained in:
parent
7a11dfd348
commit
07a4c94032
4 changed files with 14 additions and 60 deletions
|
@ -320,24 +320,19 @@ namespace NzbDrone.Core.Test
|
|||
Parser.NormalizePath(null);
|
||||
}
|
||||
|
||||
[TestCase("Hawaii Five 0 S01E19 720p WEB DL DD5 1 H 264 NT", "Hawaii Five", 1)]
|
||||
[TestCase("Chuck.4x05.HDTV.XviD-LOL", "Chuck", 4)]
|
||||
[TestCase("S03E09 WS PDTV XviD FUtV", "", 3)]
|
||||
[TestCase("5x10 WS PDTV XviD FUtV", "", 5)]
|
||||
[TestCase("Hawaii Five 0 S01 720p WEB DL DD5 1 H 264 NT", "Hawaii Five", 1)]
|
||||
[TestCase("30 Rock S03 WS PDTV XviD FUtV", "30 Rock", 3)]
|
||||
[TestCase("The Office Season 4 WS PDTV XviD FUtV", "The Office", 4)]
|
||||
[TestCase("Eureka Season 1 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
|
||||
[TestCase("The Office Season4 WS PDTV XviD FUtV", "The Office", 4)]
|
||||
[TestCase("Eureka S 01 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
|
||||
public void parse_season_info(string postTitle, string seriesName, int seasonNumber)
|
||||
{
|
||||
var result = Parser.ParseSeasonInfo(postTitle);
|
||||
var result = Parser.ParseTitle(postTitle);
|
||||
|
||||
result.SeriesTitle.Should().Be(Parser.NormalizeTitle(seriesName));
|
||||
result.CleanTitle.Should().Be(Parser.NormalizeTitle(seriesName));
|
||||
result.SeasonNumber.Should().Be(seasonNumber);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void parse_season_info_null()
|
||||
{
|
||||
var result = Parser.ParseSeasonInfo("This is not a valid post");
|
||||
|
||||
result.Should().BeNull();
|
||||
result.FullSeason.Should().BeTrue();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue