mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
Fixed: Repack check failing for episode file without a known release group
This commit is contained in:
parent
43567a3119
commit
2b1fd77ad7
@ -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 @@ public Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCr
|
||||
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);
|
||||
|
@ -32,10 +32,10 @@ public class QualityParser
|
||||
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)\]",
|
||||
|
Loading…
Reference in New Issue
Block a user