1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

Fixed: Parsing of new hashed release filenames (######_##.ext)

This commit is contained in:
Mark McDowall
2018-09-03 11:24:48 -07:00
parent ca22a25842
commit 39a8d4f0d8
2 changed files with 14 additions and 4 deletions
+6 -3
View File
@@ -252,7 +252,7 @@ namespace NzbDrone.Core.Parser
RegexOptions.IgnoreCase | RegexOptions.Compiled)
};
private static readonly Regex[] RejectHashedReleasesRegex = new Regex[]
private static readonly Regex[] RejectHashedReleasesRegexes = new Regex[]
{
// Generic match for md5 and mixed-case hashes.
new Regex(@"^[0-9a-zA-Z]{32}", RegexOptions.Compiled),
@@ -275,7 +275,10 @@ namespace NzbDrone.Core.Parser
new Regex(@"^abc$", RegexOptions.Compiled | RegexOptions.IgnoreCase),
//b00bs - Started appearing January 2015
new Regex(@"^b00bs$", RegexOptions.Compiled | RegexOptions.IgnoreCase)
new Regex(@"^b00bs$", RegexOptions.Compiled | RegexOptions.IgnoreCase),
// 170424_26 - Started appearing August 2018
new Regex(@"^\d{6}_\d{2}$"),
};
//Regex to detect whether the title was reversed.
@@ -751,7 +754,7 @@ namespace NzbDrone.Core.Parser
var titleWithoutExtension = RemoveFileExtension(title);
if (RejectHashedReleasesRegex.Any(v => v.IsMatch(titleWithoutExtension)))
if (RejectHashedReleasesRegexes.Any(v => v.IsMatch(titleWithoutExtension)))
{
Logger.Debug("Rejected Hashed Release Title: " + title);
return false;