From 87bda21b2805feada159b8e9074bca96310f15fa Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 4 Dec 2013 23:16:24 -0800 Subject: [PATCH] Fixed: Incorrect parsing as DVD for releases that contained 'pal' as part of another word --- src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs | 1 + src/NzbDrone.Core/Parser/QualityParser.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs index 3eb98a5b9..b716883cf 100644 --- a/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/QualityParserFixture.cs @@ -77,6 +77,7 @@ namespace NzbDrone.Core.Test.ParserTests [TestCase("Two.and.a.Half.Men.S08E05.720p.HDTV.X264-DIMENSION", false)] [TestCase("Sonny.With.a.Chance.S02E15.mkv", false)] [TestCase(@"E:\Downloads\tv\The.Big.Bang.Theory.S01E01.720p.HDTV\ajifajjjeaeaeqwer_eppj.avi", false)] + [TestCase("Gem.Hunt.S01E08.Tourmaline.Nepal.720p.HDTV.x264-DHD", false)] public void should_parse_hdtv720p_quality(string title, bool proper) { ParseAndVerifyQuality(title, Quality.HDTV720p, proper); diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index bbfd7ed3b..d5a1d4e13 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -16,7 +16,7 @@ namespace NzbDrone.Core.Parser private static readonly Regex SourceRegex = new Regex(@"(?BluRay)| (?WEB-DL|WEBDL|WEB\sDL|WEB\-DL|WebRip)| (?HDTV)| - (?BDRiP)|(?BRRip)|(?\bDVD\b|DVDRip|NTSC|PAL|xvidvd)| + (?BDRiP)|(?BRRip)|(?\b(?:DVD|DVDRip|NTSC|PAL|xvidvd)\b)| (?WS\sDSR|WS_DSR|WS\.DSR|DSR)|(?PDTV)|(?SDTV)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);