New: HR WS PDTV releases will be treated as HDTV720p

pull/4/head
Mark McDowall 11 years ago
parent 87d15092e5
commit 2b6f908038

@ -106,6 +106,8 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("[Doremi].Yes.Pretty.Cure.5.Go.Go!.31.[1280x720].[C65D4B1F].mkv", false)]
[TestCase("[HorribleSubs]_Fairy_Tail_-_145_[720p]", false)]
[TestCase("[Eveyuu] No Game No Life - 10 [Hi10P 1280x720 H264][10B23BD8]", false)]
[TestCase("Hells.Kitchen.US.S12E17.HR.WS.PDTV.X264-DIMENSION", false)]
[TestCase("Survivorman.The.Lost.Pilots.Summer.HR.WS.PDTV.x264-DHD", false)]
public void should_parse_hdtv720p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.HDTV720p, proper);

@ -41,6 +41,8 @@ namespace NzbDrone.Core.Parser
private static readonly Regex AnimeBlurayRegex = new Regex(@"bd(?:720|1080)|(?<=\[|\(|\s)bd(?=\s|\)|\])", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex HighDefPdtvRegex = new Regex(@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static QualityModel ParseQuality(string name)
{
Logger.Debug("Trying to parse quality for {0}", name);
@ -163,6 +165,12 @@ namespace NzbDrone.Core.Parser
sourceMatch.Groups["sdtv"].Success ||
sourceMatch.Groups["dsr"].Success)
{
if (HighDefPdtvRegex.IsMatch(normalizedName))
{
result.Quality = Quality.HDTV720p;
return result;
}
result.Quality = Quality.SDTV;
return result;
}

Loading…
Cancel
Save