Fixed: Filter DTS-ES when parsing Release Group

closes #3984
This commit is contained in:
bakerboy448 2020-10-01 04:29:54 -05:00 committed by GitHub
parent 021bb2d6d5
commit 64ddea5473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -31,6 +31,12 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Black Monday S01 E01-E02 1080p AMZN WEBRip DDP5.1 x264 monkee", null)]
[TestCase("Series.Title.S01E05.The-Aniversary.WEBDL-1080p.mkv", null)]
[TestCase("Series.Title.S01E05.The-Aniversary.HDTV-1080p.mkv", null)]
[TestCase("Shameless US (2010) S04 (1080p BDRip x265 10bit DTS-HD MA 5 1 - WEM)[TAoE]",null)]
[TestCase("The.Expanse.S03E04.2160p.Amazon.WEBRip.DTS-HD.MA.5.1.x264",null)]
[TestCase("SomeShow.S20E13.1080p.BluRay.DTS-X.MA.5.1.x264",null)]
[TestCase("SomeShow.S20E13.1080p.BluRay.DTS-MA.5.1.x264",null)]
[TestCase("SomeShow.S20E13.1080p.BluRay.DTS-ES.5.1.x264",null)]
[TestCase("SomeShow.S20E13.1080p.Blu-Ray.DTS-ES.5.1.x264",null)]
//[TestCase("", "")]
public void should_parse_release_group(string title, string expected)
{

View File

@ -384,7 +384,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex CleanQualityBracketsRegex = new Regex(@"\[[a-z0-9 ._-]+\]$",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?<releasegroup>[a-z0-9]+(?!.+?(?:480p|720p|1080p|2160p)))(?<!.*?WEB-DL|480p|720p|1080p|2160p)(?:\b|[-._ ]|$)|[-._ ]\[(?<releasegroup>[a-z0-9]+)\]$",
private static readonly Regex ReleaseGroupRegex = new Regex(@"-(?<releasegroup>[a-z0-9]+(?!.+?(?:480p|720p|1080p|2160p)))(?<!.*?WEB-DL|Blu-Ray|480p|720p|1080p|2160p|DTS-HD|DTS-X|DTS-MA|DTS-ES)(?:\b|[-._ ]|$)|[-._ ]\[(?<releasegroup>[a-z0-9]+)\]$",
RegexOptions.IgnoreCase | RegexOptions.Compiled);