1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

Fixed: Enable parsing of repacks with revision

Closes #5383
This commit is contained in:
Stevie Robinson
2023-02-04 09:08:35 +01:00
committed by GitHub
parent 83f6359063
commit e29470d8cb
2 changed files with 23 additions and 21 deletions
@@ -466,14 +466,16 @@ namespace NzbDrone.Core.Test.ParserTests
result.ResolutionDetectionSource.Should().Be(QualityDetectionSource.Name);
}
[TestCase("Series Title S04E87 REPACK 720p HDTV x264 aAF", true)]
[TestCase("Series.Title.S04E87.REPACK.720p.HDTV.x264-aAF", true)]
[TestCase("Series.Title.S04E87.PROPER.720p.HDTV.x264-aAF", false)]
[TestCase("Series.Title.S01E07.RERIP.720p.BluRay.x264-DEMAND", true)]
public void should_be_able_to_parse_repack(string title, bool isRepack)
[TestCase("Series Title S04E87 REPACK 720p HDTV x264 aAF", true, 2)]
[TestCase("Series.Title.S04E87.REPACK.720p.HDTV.x264-aAF", true, 2)]
[TestCase("Series.Title.S04E87.REPACK2.720p.HDTV.x264-aAF", true, 3)]
[TestCase("Series.Title.S04E87.PROPER.720p.HDTV.x264-aAF", false, 2)]
[TestCase("Series.Title.S01E07.RERIP.720p.BluRay.x264-DEMAND", true, 2)]
[TestCase("Series.Title.S01E07.RERIP2.720p.BluRay.x264-DEMAND", true, 3)]
public void should_be_able_to_parse_repack(string title, bool isRepack, int version)
{
var result = QualityParser.ParseQuality(title);
result.Revision.Version.Should().Be(2);
result.Revision.Version.Should().Be(version);
result.Revision.IsRepack.Should().Be(isRepack);
}