Add missing remux quality parsing tests

This commit is contained in:
bakerboy448 2021-11-21 12:05:58 -06:00 committed by GitHub
parent dd3b57da27
commit a30ec0eb52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,8 @@ namespace NzbDrone.Core.Test.ParserTests
new object[] { Quality.Bluray720p },
new object[] { Quality.Bluray1080p },
new object[] { Quality.Bluray2160p },
new object[] { Quality.Bluray1080pRemux },
new object[] { Quality.Bluray2160pRemux },
};
public static object[] OtherSourceQualityParserCases =
@ -41,6 +43,8 @@ namespace NzbDrone.Core.Test.ParserTests
new object[] { "720p BluRay", Quality.Bluray720p },
new object[] { "1080p BluRay", Quality.Bluray1080p },
new object[] { "2160p BluRay", Quality.Bluray2160p },
new object[] { "1080p Remux", Quality.Bluray1080pRemux },
new object[] { "2160p Remux", Quality.Bluray2160pRemux },
};
[TestCase("S07E23 .avi ", false)]

View File

@ -64,7 +64,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex HighDefPdtvRegex = new Regex(@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex RemuxRegex = new Regex(@"[_. ](?<remux>(?:(BD)[-_. ])?Remux)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex RemuxRegex = new Regex(@"(?:[_. ]|\d{4}p-)(?<remux>(?:(BD|UHD)[-_. ]?)?Remux)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static QualityModel ParseQuality(string name)
{