diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index 1bc922c30..d9812349f 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -31,9 +31,11 @@ namespace NzbDrone.Core.Parser )(?:\b|$|[ .])", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - private static readonly Regex RawHDRegex = new Regex(@"\b(?RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b", + private static readonly Regex RawHDRegex = new Regex(@"\b(?RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex MPEG2Regex = new Regex(@"\b(?MPEG[-_. ]?2)\b"); + private static readonly Regex ProperRegex = new Regex(@"\b(?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;