From 20124ab61d673aab7f8e6f61cd0de7cc6e357a7c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 16 May 2014 23:01:36 -0700 Subject: [PATCH] Fixed: Parsing of some quality from some Bluray files --- .../ParserTests/QualityParserFixture.cs | 3 +++ src/NzbDrone.Core/Parser/QualityParser.cs | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index 8ef71e8d3..2a6ae3317 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -116,6 +116,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Two and a Half Men S10E03 1080p WEB DL DD5 1 H 264 REPACK NFHD", true)] [TestCase("Glee.S04E09.Swan.Song.1080p.WEB-DL.DD5.1.H.264-ECI", false)] [TestCase("The.Big.Bang.Theory.S06E11.The.Santa.Simulation.1080p.WEB-DL.DD5.1.H.264", false)] + [TestCase("Rosemary's.Baby.S01E02.Night.2.[WEBDL-1080p].mkv", false)] public void should_parse_webdl1080p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBDL1080p, proper); @@ -124,6 +125,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("WEEDS.S03E01-06.DUAL.Bluray.AC3.-HELLYWOOD.avi", false)] [TestCase("Chuck - S01E03 - Come Fly With Me - 720p BluRay.mkv", false)] [TestCase("The Big Bang Theory.S03E01.The Electric Can Opener Fluctuation.m2ts", false)] + [TestCase("Revolution.S01E02.Chained.Heat.[Bluray720p].mkv", false)] public void should_parse_bluray720p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.Bluray720p, proper); @@ -131,6 +133,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Chuck - S01E03 - Come Fly With Me - 1080p BluRay.mkv", false)] [TestCase("Sons.Of.Anarchy.S02E13.1080p.BluRay.x264-AVCDVD", false)] + [TestCase("Revolution.S01E02.Chained.Heat.[Bluray1080p].mkv", false)] public void should_parse_bluray1080p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.Bluray1080p, proper); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index b45c3d281..331133767 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -176,6 +176,16 @@ namespace NzbDrone.Core.Parser return result; } + if (normalizedName.Contains("bluray720p")) + { + result.Quality = Quality.Bluray720p; + } + + if (normalizedName.Contains("bluray1080p")) + { + result.Quality = Quality.Bluray1080p; + } + //Based on extension if (result.Quality == Quality.Unknown && !name.ContainsInvalidPathChars()) {