Fixed: Incorrect parsing as DVD for releases that contained 'pal' as part of another word

This commit is contained in:
Mark McDowall 2013-12-04 23:16:24 -08:00
parent 693dd8f622
commit 87bda21b28
2 changed files with 2 additions and 1 deletions

View File

@ -77,6 +77,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Two.and.a.Half.Men.S08E05.720p.HDTV.X264-DIMENSION", false)] [TestCase("Two.and.a.Half.Men.S08E05.720p.HDTV.X264-DIMENSION", false)]
[TestCase("Sonny.With.a.Chance.S02E15.mkv", 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(@"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) public void should_parse_hdtv720p_quality(string title, bool proper)
{ {
ParseAndVerifyQuality(title, Quality.HDTV720p, proper); ParseAndVerifyQuality(title, Quality.HDTV720p, proper);

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex SourceRegex = new Regex(@"(?<bluray>BluRay)| private static readonly Regex SourceRegex = new Regex(@"(?<bluray>BluRay)|
(?<webdl>WEB-DL|WEBDL|WEB\sDL|WEB\-DL|WebRip)| (?<webdl>WEB-DL|WEBDL|WEB\sDL|WEB\-DL|WebRip)|
(?<hdtv>HDTV)| (?<hdtv>HDTV)|
(?<bdrip>BDRiP)|(?<brrip>BRRip)|(?<dvd>\bDVD\b|DVDRip|NTSC|PAL|xvidvd)| (?<bdrip>BDRiP)|(?<brrip>BRRip)|(?<dvd>\b(?:DVD|DVDRip|NTSC|PAL|xvidvd)\b)|
(?<dsr>WS\sDSR|WS_DSR|WS\.DSR|DSR)|(?<pdtv>PDTV)|(?<sdtv>SDTV)", (?<dsr>WS\sDSR|WS_DSR|WS\.DSR|DSR)|(?<pdtv>PDTV)|(?<sdtv>SDTV)",
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);