From 00a66e90303b3a1885c2acedee22dcfc1a517eb8 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 23 Mar 2019 11:54:11 -0700 Subject: [PATCH] Fixed: Parsing of some WEB releases Fixes #3001 --- src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs | 2 ++ src/NzbDrone.Core/Parser/QualityParser.cs | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index ce2c35418..b7f36b569 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -183,6 +183,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Hush 2016 German DD51 DL 720p NetflixHD x264-TVS", false)] [TestCase("Community.6x10.Basic.RV.Repair.and.Palmistry.ITA.ENG.720p.WEB-DLMux.H.264-GiuseppeTnT", false)] [TestCase("Community.6x11.Modern.Espionage.ITA.ENG.720p.WEB.DLMux.H.264-GiuseppeTnT", false)] + [TestCase("The Walking Dead 2010 S09E13 [MKV / H.264 / AC3/AAC / WEB / Dual Áudio / Inglês / 720p]", false)] public void should_parse_webdl720p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBDL720p, proper); @@ -224,6 +225,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Arrested.Development.S04E01.iNTERNAL.1080p.WEBRip.x264-QRUS", false)] [TestCase("Blue.Bloods.S07E20.1080p.AMZN.WEBRip.DDP5.1.x264-ViSUM ac3.(NLsub)", false)] [TestCase("Better.Call.Saul.S03E09.1080p.NF.WEBRip.DD5.1.x264-ViSUM", false)] + [TestCase("The Walking Dead S09E13 1.54 GB WEB-RIP 1080p Dual-Audio 2019 MKV", false)] public void should_parse_webrip1080p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.WEBRip1080p, proper); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index c3e5b3439..e3404c8ba 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -16,8 +16,8 @@ namespace NzbDrone.Core.Parser private static readonly Regex SourceRegex = new Regex(@"\b(?: (?BluRay|Blu-Ray|HD-?DVD|BD)| - (?WEB[-_. ]DL|WEBDL|AmazonHD|iTunesHD|NetflixU?HD|WebHD|[. ]WEB[. ](?:[xh]26[45]|DDP?5[. ]1)|\d+0p[. ]WEB[. ]|WEB-DLMux)| - (?WebRip)| + (?WEB[-_. ]DL|WEBDL|AmazonHD|iTunesHD|NetflixU?HD|WebHD|[. ]WEB[. ](?:[xh]26[45]|DDP?5[. ]1)|\d+0p[. ]WEB[. ]|WEB-DLMux|\b\s\/\sWEB\s\/\s\b)| + (?WebRip|Web-Rip)| (?HDTV)| (?BDRip)| (?BRRip)| @@ -92,6 +92,7 @@ namespace NzbDrone.Core.Parser return result; } + var test = SourceRegex.Matches(normalizedName); var sourceMatch = SourceRegex.Matches(normalizedName).OfType().LastOrDefault(); var resolution = ParseResolution(normalizedName); var codecRegex = CodecRegex.Match(normalizedName);