Fixed: Repack check failing for episode file without a known release group

This commit is contained in:
Mark McDowall 2019-05-05 11:01:38 -07:00
parent 43567a3119
commit 2b1fd77ad7
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Linq;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Parser.Model;
@ -30,7 +31,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
var releaseGroup = subject.ParsedEpisodeInfo.ReleaseGroup;
var fileReleaseGroup = file.ReleaseGroup;
if (!fileReleaseGroup.Equals(releaseGroup, StringComparison.InvariantCultureIgnoreCase))
if (fileReleaseGroup.IsNotNullOrWhiteSpace() && !fileReleaseGroup.Equals(releaseGroup, StringComparison.InvariantCultureIgnoreCase))
{
_logger.Debug("Release is a repack for a different release group. Release Group: {0}. File release group: {0}", releaseGroup, fileReleaseGroup);
return Decision.Reject("Release is a repack for a different release group. Release Group: {0}. File release group: {0}", releaseGroup, fileReleaseGroup);

View File

@ -32,10 +32,10 @@ namespace NzbDrone.Core.Parser
private static readonly Regex RawHDRegex = new Regex(@"\b(?<rawhd>RawHD|1080i[-_. ]HDTV|Raw[-_. ]HD|MPEG[-_. ]?2)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ProperRegex = new Regex(@"\b(?<proper>proper|rerip)\b",
private static readonly Regex ProperRegex = new Regex(@"\b(?<proper>proper)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex RepackRegex = new Regex(@"\b(?<repack>repack)\b",
private static readonly Regex RepackRegex = new Regex(@"\b(?<repack>repack|rerip)\b",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex VersionRegex = new Regex(@"\dv(?<version>\d)\b|\[v(?<version>\d)\]",