Fixed: Changed Quality Parser to avoid matching tags in the Episode title instead of the Quality tags.

pull/3113/head
Taloth Saldono 8 years ago
parent cd3b6000a0
commit 19d625c6c5

@ -165,6 +165,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Series Title S06E08 1080p WEB h264-EXCLUSIVE", false)] [TestCase("Series Title S06E08 1080p WEB h264-EXCLUSIVE", false)]
[TestCase("Series Title S06E08 No One PROPER 1080p WEB DD5 1 H 264-EXCLUSIVE", true)] [TestCase("Series Title S06E08 No One PROPER 1080p WEB DD5 1 H 264-EXCLUSIVE", true)]
[TestCase("Series Title S06E08 No One PROPER 1080p WEB H 264-EXCLUSIVE", true)] [TestCase("Series Title S06E08 No One PROPER 1080p WEB H 264-EXCLUSIVE", true)]
[TestCase("The.Simpsons.S25E21.Pay.Pal.1080p.WEB-DL.DD5.1.H.264-NTb", false)]
public void should_parse_webdl1080p_quality(string title, bool proper) public void should_parse_webdl1080p_quality(string title, bool proper)
{ {
ParseAndVerifyQuality(title, Quality.WEBDL1080p, proper); ParseAndVerifyQuality(title, Quality.WEBDL1080p, proper);

@ -1,5 +1,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using NLog; using NLog;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
@ -65,10 +66,12 @@ namespace NzbDrone.Core.Parser
return result; return result;
} }
var sourceMatch = SourceRegex.Match(normalizedName); var sourceMatch = SourceRegex.Matches(normalizedName).OfType<Match>().LastOrDefault();
var resolution = ParseResolution(normalizedName); var resolution = ParseResolution(normalizedName);
var codecRegex = CodecRegex.Match(normalizedName); var codecRegex = CodecRegex.Match(normalizedName);
if (sourceMatch != null && sourceMatch.Success)
{
if (sourceMatch.Groups["bluray"].Success) if (sourceMatch.Groups["bluray"].Success)
{ {
if (codecRegex.Groups["xvid"].Success || codecRegex.Groups["divx"].Success) if (codecRegex.Groups["xvid"].Success || codecRegex.Groups["divx"].Success)
@ -196,6 +199,7 @@ namespace NzbDrone.Core.Parser
result.Quality = Quality.SDTV; result.Quality = Quality.SDTV;
return result; return result;
} }
}
//Anime Bluray matching //Anime Bluray matching

Loading…
Cancel
Save