mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fixed: Bluray 576p will be detected as DVD instead of Bluray 720p
This commit is contained in:
parent
a40b9a306e
commit
16c60ff92c
@ -56,6 +56,7 @@ public void should_parse_sdtv_quality(string title, bool proper)
|
||||
[TestCase("The.Girls.Next.Door.S03E06.DVD.Rip.XviD-WiDE", false)]
|
||||
[TestCase("the.shield.1x13.circles.ws.xvidvd-tns", false)]
|
||||
[TestCase("the_x-files.9x18.sunshine_days.ac3.ws_dvdrip_xvid-fov.avi", false)]
|
||||
[TestCase("Hannibal.S01E05.576p.BluRay.DD5.1.x264-HiSD", false)]
|
||||
public void should_parse_dvd_quality(string title, bool proper)
|
||||
{
|
||||
ParseAndVerifyQuality(title, Quality.DVD, proper);
|
||||
|
@ -5,7 +5,6 @@
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.Parser
|
||||
{
|
||||
@ -32,7 +31,7 @@ public class QualityParser
|
||||
private static readonly Regex ProperRegex = new Regex(@"\b(?<proper>proper|repack)\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?<_480p>480p)|(?<_720p>720p)|(?<_1080p>1080p))\b",
|
||||
private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?<_480p>480p)|(?<_576p>576p)|(?<_720p>720p)|(?<_1080p>1080p))\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex CodecRegex = new Regex(@"\b(?:(?<x264>x264)|(?<h264>h264)|(?<xvidhd>XvidHD)|(?<xvid>Xvid)|(?<divx>divx))\b",
|
||||
@ -72,6 +71,12 @@ public static QualityModel ParseQuality(string name)
|
||||
return result;
|
||||
}
|
||||
|
||||
if (resolution == Resolution._576p)
|
||||
{
|
||||
result.Quality = Quality.DVD;
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Quality = Quality.Bluray720p;
|
||||
return result;
|
||||
}
|
||||
@ -209,6 +214,7 @@ private static Resolution ParseResolution(string name)
|
||||
|
||||
if (!match.Success) return Resolution.Unknown;
|
||||
if (match.Groups["_480p"].Success) return Resolution._480p;
|
||||
if (match.Groups["_576p"].Success) return Resolution._576p;
|
||||
if (match.Groups["_720p"].Success) return Resolution._720p;
|
||||
if (match.Groups["_1080p"].Success) return Resolution._1080p;
|
||||
|
||||
@ -219,6 +225,7 @@ private static Resolution ParseResolution(string name)
|
||||
public enum Resolution
|
||||
{
|
||||
_480p,
|
||||
_576p,
|
||||
_720p,
|
||||
_1080p,
|
||||
Unknown
|
||||
|
Loading…
Reference in New Issue
Block a user