From 6508e920fe5d05b6a86117a928a1acce00a3f068 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Thu, 17 Mar 2016 21:03:01 +0100 Subject: [PATCH] New: Added (fairly strict) regex for the new scene WEB quality = WEB-DL. --- .../ParserTests/QualityParserFixture.cs | 8 ++++++++ src/NzbDrone.Core/Parser/QualityParser.cs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index c2ded603b..4e82316dd 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -143,6 +143,8 @@ public void should_parse_hdtv1080p_quality(string title, bool proper) [TestCase("Da.Vincis.Demons.S02E04.720p.WEB.DL.nSD.x264-NhaNc3", false)] [TestCase("CSI.Miami.S04E25.720p.iTunesHD.AVC-TVS", false)] [TestCase("Castle.S06E23.720p.WebHD.h264-euHD", false)] + [TestCase("The.Nightly.Show.2016.03.14.720p.WEB.x264-spamTV", false)] + [TestCase("The.Nightly.Show.2016.03.14.720p.WEB.h264-spamTV", false)] public void should_parse_webdl720p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBDL720p, proper); @@ -157,6 +159,8 @@ public void should_parse_webdl720p_quality(string title, bool proper) [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)] + [TestCase("The.Nightly.Show.2016.03.14.1080p.WEB.x264-spamTV", false)] + [TestCase("The.Nightly.Show.2016.03.14.1080p.WEB.h264-spamTV", false)] public void should_parse_webdl1080p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBDL1080p, proper); @@ -166,6 +170,9 @@ public void should_parse_webdl1080p_quality(string title, bool proper) [TestCase("JUST ADD MAGIC S01E01.2160P AMZN WEBRIP DD2.0 X264-TROLLUHD", false)] [TestCase("The.Man.In.The.High.Castle.S01E01.2160p.AMZN.WEBRip.DD2.0.Hi10p.X264-TrollUHD", false)] [TestCase("The Man In the High Castle S01E01 2160p AMZN WEBRip DD2.0 Hi10P x264-TrollUHD", false)] + [TestCase("The.Nightly.Show.2016.03.14.2160p.WEB.x264-spamTV", false)] + [TestCase("The.Nightly.Show.2016.03.14.2160p.WEB.h264-spamTV", false)] + [TestCase("The.Nightly.Show.2016.03.14.2160p.WEB.PROPER.h264-spamTV", true)] public void should_parse_webdl2160p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBDL2160p, proper); @@ -219,6 +226,7 @@ public void should_parse_raw_quality(string title, bool proper) [TestCase("Sonny.With.a.Chance.S02E15", false)] [TestCase("Law & Order: Special Victims Unit - 11x11 - Quickie", false)] [TestCase("Series.Title.S01E01.webm", false)] + [TestCase("Droned.S01E01.The.Web.MT-dd", false)] public void quality_parse(string title, bool proper) { ParseAndVerifyQuality(title, Quality.Unknown, proper); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index 57294c73e..ac4ad8925 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -14,7 +14,7 @@ public class QualityParser private static readonly Regex SourceRegex = new Regex(@"\b(?: (?BluRay|Blu-Ray|HDDVD|BD)| - (?WEB[-_. ]DL|WEBDL|WebRip|iTunesHD|WebHD)| + (?WEB[-_. ]DL|WEBDL|WebRip|iTunesHD|WebHD|\.WEB\.[xh]26[45]|\d+0p\.WEB\.)| (?HDTV)| (?BDRip)| (?BRRip)|