mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-19 21:46:43 -04:00
committed by
Mark McDowall
parent
1fcfb88d2a
commit
e88f25d3bf
@@ -502,6 +502,13 @@ namespace NzbDrone.Core.Test.ParserTests
|
|||||||
result.Revision.IsRepack.Should().Be(isRepack);
|
result.Revision.IsRepack.Should().Be(isRepack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestCase("[MTBB] Series Title - S02E02 - 027 - Episode Title [WEBDL-1080p v2][x264][AAC]", 2)]
|
||||||
|
public void should_be_able_to_parse_anime_version(string title, int version)
|
||||||
|
{
|
||||||
|
var result = QualityParser.ParseQuality(title);
|
||||||
|
result.Revision.Version.Should().Be(version);
|
||||||
|
}
|
||||||
|
|
||||||
private void ParseAndVerifyQuality(string title, Quality quality, bool proper)
|
private void ParseAndVerifyQuality(string title, Quality quality, bool proper)
|
||||||
{
|
{
|
||||||
var result = QualityParser.ParseQuality(title);
|
var result = QualityParser.ParseQuality(title);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace NzbDrone.Core.Parser
|
|||||||
private static readonly Regex RepackRegex = new (@"\b(?<repack>repack\d?|rerip\d?)\b",
|
private static readonly Regex RepackRegex = new (@"\b(?<repack>repack\d?|rerip\d?)\b",
|
||||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
private static readonly Regex VersionRegex = new (@"\d[-._ ]?v(?<version>\d)[-._ ]|\[v(?<version>\d)\]|repack(?<version>\d)|rerip(?<version>\d)",
|
private static readonly Regex VersionRegex = new (@"\d[-._ ]?v(?<version>\d)[-._ ]|\[v(?<version>\d)\]|repack(?<version>\d)|rerip(?<version>\d)|(?:480|576|720|1080|2160)p[._ ]v(?<version>\d)",
|
||||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
private static readonly Regex RealRegex = new (@"\b(?<real>REAL)\b",
|
private static readonly Regex RealRegex = new (@"\b(?<real>REAL)\b",
|
||||||
|
|||||||
Reference in New Issue
Block a user