mirror of
https://github.com/Radarr/Radarr
synced 2024-12-28 19:05:55 +00:00
Fixed: BDRemux not recognized as such and BDRips without resolution recognized as DVD. Fixes #1755
This commit is contained in:
parent
1f4c2ad946
commit
ac5732536d
2 changed files with 20 additions and 8 deletions
|
@ -74,8 +74,7 @@ public void should_parse_sdtv_quality(string title, bool proper)
|
|||
[TestCase("WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3-REPACK.-HELLYWOOD.avi", true)]
|
||||
[TestCase("The.Shield.S01E13.NTSC.x264-CtrlSD", false)]
|
||||
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD", false)]
|
||||
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.X-viD.AC3.-HELLYWOOD", false)]
|
||||
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.AC3.-HELLYWOOD", false)]
|
||||
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.X-viD.AC3.-HELLYWOOD", false)]
|
||||
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.XviD.AC3.-HELLYWOOD.avi", false)]
|
||||
[TestCase("WEEDS.S03E01-06.DUAL.XviD.Bluray.AC3.-HELLYWOOD.avi", false)]
|
||||
[TestCase("The.Girls.Next.Door.S03E06.DVDRip.XviD-WiDE", false)]
|
||||
|
@ -83,8 +82,6 @@ public void should_parse_sdtv_quality(string title, bool proper)
|
|||
[TestCase("the.shield.1x13.circles.ws.xvidvd-tns", false)]
|
||||
[TestCase("the_x-files.9x18.sunshine_days.ac3.ws_dvdrip_xvid-fov.avi", false)]
|
||||
[TestCase("[FroZen] Miyuki - 23 [DVD][7F6170E6]", false)]
|
||||
[TestCase("Hannibal.S01E05.480p.BluRay.DD5.1.x264-HiSD", false)]
|
||||
[TestCase("Heidi Girl of the Alps (BD)(640x480(RAW) (BATCH 1) (1-13)", false)]
|
||||
[TestCase("[Doki] Clannad - 02 (848x480 XviD BD MP3) [95360783]", false)]
|
||||
public void should_parse_dvd_quality(string title, bool proper)
|
||||
{
|
||||
|
@ -100,6 +97,14 @@ public void should_parse_webdl480p_quality(string title, bool proper)
|
|||
ParseAndVerifyQuality(title, Quality.WEBDL480p, proper);
|
||||
}
|
||||
|
||||
[TestCase("Heidi Girl of the Alps (BD)(640x480(RAW) (BATCH 1) (1-13)", false)]
|
||||
[TestCase("Hannibal.S01E05.480p.BluRay.DD5.1.x264-HiSD", false)]
|
||||
[TestCase("WEEDS.S03E01-06.DUAL.BDRip.AC3.-HELLYWOOD", false)]
|
||||
public void should_parse_bluray480p_quality(string title, bool proper)
|
||||
{
|
||||
ParseAndVerifyQuality(title, Quality.Bluray480p, proper);
|
||||
}
|
||||
|
||||
[TestCase("Dexter - S01E01 - Title [HDTV]", false)]
|
||||
[TestCase("Dexter - S01E01 - Title [HDTV-720p]", false)]
|
||||
[TestCase("Pawn Stars S04E87 REPACK 720p HDTV x264 aAF", true)]
|
||||
|
@ -227,6 +232,7 @@ public void should_parse_bluray576p_quality(string title)
|
|||
|
||||
[TestCase("Contract.to.Kill.2016.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT")]
|
||||
[TestCase("27.Dresses.2008.REMUX.1080p.Bluray.AVC.DTS-HR.MA.5.1-LEGi0N")]
|
||||
[TestCase("27.Dresses.2008.BDREMUX.1080p.Bluray.AVC.DTS-HR.MA.5.1-LEGi0N")]
|
||||
public void should_parse_remux1080p_quality(string title)
|
||||
{
|
||||
ParseAndVerifyQuality(title, Quality.Remux1080p, false);
|
||||
|
|
|
@ -50,7 +50,7 @@ public class QualityParser
|
|||
|
||||
private static readonly Regex HardcodedSubsRegex = new Regex(@"\b(?<hcsub>(\w+SUBS?)\b)|(?<hc>(HC))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
private static readonly Regex RemuxRegex = new Regex(@"\b(?<remux>Remux)\b",
|
||||
private static readonly Regex RemuxRegex = new Regex(@"\b(?<remux>(BD)?Remux)\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex ProperRegex = new Regex(@"\b(?<proper>proper|repack|rerip)\b",
|
||||
|
@ -65,7 +65,7 @@ public class QualityParser
|
|||
private static readonly Regex ResolutionRegex = new Regex(@"\b(?:(?<R480p>480p|640x480|848x480)|(?<R576p>576p)|(?<R720p>720p|1280x720)|(?<R1080p>1080p|1920x1080)|(?<R2160p>2160p))\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex CodecRegex = new Regex(@"\b(?:(?<x264>x264)|(?<h264>h264)|(?<xvidhd>XvidHD)|(?<xvid>Xvid)|(?<divx>divx))\b",
|
||||
private static readonly Regex CodecRegex = new Regex(@"\b(?:(?<x264>x264)|(?<h264>h264)|(?<xvidhd>XvidHD)|(?<xvid>X-?vid)|(?<divx>divx))\b",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex OtherSourceRegex = new Regex(@"(?<hdtv>HD[-_. ]TV)|(?<sdtv>SD[-_. ]TV)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
@ -144,7 +144,7 @@ public static QualityModel ParseQuality(string name)
|
|||
|
||||
if (resolution == Resolution.R480P)
|
||||
{
|
||||
result.Quality = Quality.DVD;
|
||||
result.Quality = Quality.Bluray480p;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -215,6 +215,12 @@ public static QualityModel ParseQuality(string name)
|
|||
if (sourceMatch.Groups["bdrip"].Success ||
|
||||
sourceMatch.Groups["brrip"].Success)
|
||||
{
|
||||
if (codecRegex.Groups["xvid"].Success || codecRegex.Groups["divx"].Success)
|
||||
{
|
||||
result.Quality = Quality.DVD;
|
||||
return result;
|
||||
}
|
||||
|
||||
switch (resolution)
|
||||
{
|
||||
case Resolution.R720p:
|
||||
|
@ -230,7 +236,7 @@ public static QualityModel ParseQuality(string name)
|
|||
result.Quality = Quality.Bluray480p;
|
||||
return result;
|
||||
default:
|
||||
result.Quality = Quality.DVD;
|
||||
result.Quality = Quality.Bluray480p;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue