1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Fixed: RawHD quality detection

Fixes #5267
Fixes #5207
This commit is contained in:
Qstick
2020-11-05 21:36:14 -05:00
parent b8df38e929
commit 025f064ecf
2 changed files with 26 additions and 14 deletions
+18 -1
View File
@@ -36,9 +36,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|Raw[-_. ]HD)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex MPEG2Regex = new Regex(@"\b(?<mpeg2>MPEG[-_. ]?2)\b");
private static readonly Regex BRDISKRegex = new Regex(@"\b(COMPLETE|ISO|BDISO|BD25|BD50|BR.?DISK)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
@@ -126,6 +128,15 @@ namespace NzbDrone.Core.Parser
var remuxMatch = RemuxRegex.IsMatch(normalizedName);
var brDiskMatch = BRDISKRegex.IsMatch(normalizedName);
if (RawHDRegex.IsMatch(normalizedName) && !brDiskMatch)
{
result.SourceDetectionSource = QualityDetectionSource.Name;
result.ResolutionDetectionSource = QualityDetectionSource.Name;
result.Quality = Quality.RAWHD;
return result;
}
if (resolution != Resolution.Unknown)
{
result.ResolutionDetectionSource = QualityDetectionSource.Name;
@@ -278,6 +289,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;