Fixed: Parsing of some quality from some Bluray files

pull/3113/head
Mark McDowall 11 years ago
parent 0acea5a22c
commit 20124ab61d

@ -116,6 +116,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Two and a Half Men S10E03 1080p WEB DL DD5 1 H 264 REPACK NFHD", true)]
[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)]
public void should_parse_webdl1080p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.WEBDL1080p, proper);
@ -124,6 +125,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("WEEDS.S03E01-06.DUAL.Bluray.AC3.-HELLYWOOD.avi", false)]
[TestCase("Chuck - S01E03 - Come Fly With Me - 720p BluRay.mkv", false)]
[TestCase("The Big Bang Theory.S03E01.The Electric Can Opener Fluctuation.m2ts", false)]
[TestCase("Revolution.S01E02.Chained.Heat.[Bluray720p].mkv", false)]
public void should_parse_bluray720p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray720p, proper);
@ -131,6 +133,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Chuck - S01E03 - Come Fly With Me - 1080p BluRay.mkv", false)]
[TestCase("Sons.Of.Anarchy.S02E13.1080p.BluRay.x264-AVCDVD", false)]
[TestCase("Revolution.S01E02.Chained.Heat.[Bluray1080p].mkv", false)]
public void should_parse_bluray1080p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.Bluray1080p, proper);

@ -176,6 +176,16 @@ namespace NzbDrone.Core.Parser
return result;
}
if (normalizedName.Contains("bluray720p"))
{
result.Quality = Quality.Bluray720p;
}
if (normalizedName.Contains("bluray1080p"))
{
result.Quality = Quality.Bluray1080p;
}
//Based on extension
if (result.Quality == Quality.Unknown && !name.ContainsInvalidPathChars())
{

Loading…
Cancel
Save