Fixed: DVDR Parsing as DVDRip

Fixes #4486
This commit is contained in:
Qstick 2020-06-03 22:18:07 -04:00
parent 13f3d0292c
commit 67ff8d39da
2 changed files with 17 additions and 3 deletions

View File

@ -62,7 +62,6 @@ namespace NzbDrone.Core.Test.ParserTests
ParseAndVerifyQuality(title, Source.TV, proper, Resolution.R480p);
}
[TestCase("The.Shield.S01E13.NTSC.x264-CtrlSD", false)]
[TestCase("The.Girls.Next.Door.S03E06.DVDRip.XviD-WiDE", false)]
[TestCase("The.Girls.Next.Door.S03E06.DVD.Rip.XviD-WiDE", false)]
[TestCase("the.shield.1x13.circles.ws.xvidvd-tns", false)]
@ -73,6 +72,15 @@ namespace NzbDrone.Core.Test.ParserTests
ParseAndVerifyQuality(title, Source.DVD, proper, Resolution.R480p);
}
[TestCase("Barbie.Fairytopia.Magic.of.the.Rainbow.2007.DVD5.NTSC", false)]
[TestCase("Barbie.Fairytopia.Magic.of.the.Rainbow.2007.DVD9.NTSC", false)]
[TestCase("Barbie.Fairytopia.Magic.of.the.Rainbow.2007.DVDR.NTSC", false)]
[TestCase("Barbie.Fairytopia.Magic.of.the.Rainbow.2007.DVD-R.NTSC", false)]
public void should_parse_dvdr_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Source.DVD, proper, Resolution.R480p, Modifier.REMUX);
}
[TestCase("Elementary.S01E10.The.Leviathan.480p.WEB-DL.x264-mSD", false)]
[TestCase("Glee.S04E10.Glee.Actually.480p.WEB-DL.x264-mSD", false)]
[TestCase("The.Big.Bang.Theory.S06E11.The.Santa.Simulation.480p.WEB-DL.x264-mSD", false)]

View File

@ -21,8 +21,8 @@ namespace NzbDrone.Core.Parser
(?<hdtv>HDTV)|
(?<bdrip>BDRip)|
(?<brrip>BRRip)|
(?<dvdr>DVD-R|DVDR)|
(?<dvd>DVD|DVDRip|NTSC|PAL|xvidvd)|
(?<dvdr>DVD-R|DVDR|DVD5|DVD9)|
(?<dvd>DVD(?!-R)|DVDRip|xvidvd)|
(?<dsr>WS[-_. ]DSR|DSR)|
(?<regional>R[0-9]{1}|REGIONAL)|
(?<scr>SCR|SCREENER|DVDSCR|DVDSCREENER)|
@ -317,6 +317,12 @@ namespace NzbDrone.Core.Parser
}
}
if (sourceMatch.Groups["dvdr"].Success)
{
result.Quality = Quality.DVDR;
return result;
}
if (sourceMatch.Groups["dvd"].Success)
{
result.Quality = Quality.DVD;