Fixed: Limit Raw HD detection by MPEG-2 to HDTV sources

pull/4037/head
Mark McDowall 4 years ago
parent 4ad137f1eb
commit 19f724dcd9

@ -31,9 +31,11 @@ namespace NzbDrone.Core.Parser
)(?:\b|$|[ .])",
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
private static readonly Regex RawHDRegex = new Regex(@"\b(?<rawhd>RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b",
private static readonly Regex RawHDRegex = new Regex(@"\b(?<rawhd>RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex MPEG2Regex = new Regex(@"\b(?<mpeg2>MPEG[-_. ]?2)\b");
private static readonly Regex ProperRegex = new Regex(@"\b(?<proper>proper)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
@ -210,6 +212,12 @@ namespace NzbDrone.Core.Parser
if (sourceMatch.Groups["hdtv"].Success)
{
if (MPEG2Regex.IsMatch(normalizedName))
{
result.Quality = Quality.RAWHD;
return result;
}
if (resolution == Resolution.R2160p)
{
result.Quality = Quality.HDTV2160p;
@ -403,7 +411,6 @@ namespace NzbDrone.Core.Parser
}
}
if (codecRegex.Groups["x264"].Success)
{
result.Quality = Quality.SDTV;

Loading…
Cancel
Save