1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 01:37:07 +00:00

Parser: Removes any combination of 'rakuv*` from release group names.

This commit is contained in:
desimaniac 2019-03-09 03:41:22 -06:00 committed by Taloth
parent 0cc2437a9d
commit a6fdcb7493
2 changed files with 4 additions and 1 deletions

View file

@ -29,6 +29,9 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("The.Middle.S09E13.720p.HEVC.x265-MeGusta-Pre", "MeGusta")]
[TestCase("Ghosted.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-postbot", "NTb")]
[TestCase("Ghosted.S01E08.Haunted.Hayride.720p.AMZN.WEBRip.DDP5.1.x264-NTb-xpost", "NTb")]
[TestCase("Blue.Bloods.S08E05.The.Forgotten.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb-Rakuv", "NTb")]
[TestCase("Lie.To.Me.S01E13.720p.BluRay.x264-SiNNERS-Rakuvfinhel", "SiNNERS")]
[TestCase("Who.is.America.S01E01.INTERNAL.720p.HDTV.x264-aAF-RakuvUS-Obfuscated", "aAF")]
[TestCase("Series Title - S01E01 - Episode Title [RlsGroup]", "RlsGroup")]
[TestCase("Black Monday S01 E01-E02 1080p AMZN WEBRip DDP5.1 x264 monkee", null)]
//[TestCase("", "")]

View file

@ -324,7 +324,7 @@ namespace NzbDrone.Core.Parser
private static readonly Regex SixDigitAirDateRegex = new Regex(@"(?<=[_.-])(?<airdate>(?<!\d)(?<airyear>[1-9]\d{1})(?<airmonth>[0-1][0-9])(?<airday>[0-3][0-9]))(?=[_.-])",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly RegexReplace CleanReleaseGroupRegex = new RegexReplace(@"^(.*?[-._ ](S\d+E\d+)[-._ ])|(-(RP|1|NZBGeek|Obfuscated|Scrambled|sample|Pre|postbot|xpost))+$",
private static readonly RegexReplace CleanReleaseGroupRegex = new RegexReplace(@"^(.*?[-._ ](S\d+E\d+)[-._ ])|(-(RP|1|NZBGeek|Obfuscated|Scrambled|sample|Pre|postbot|xpost|Rakuv[a-z]*))+$",
string.Empty,
RegexOptions.IgnoreCase | RegexOptions.Compiled);