diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs index e63edaa8c..88ea7550c 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/AcceptableSizeSpecification.cs @@ -41,7 +41,7 @@ public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase sear if (quality == Quality.Unknown) { _logger.Trace("Unknown quality. skipping size check."); - return false; + return true; } var qualityDefinition = _qualityDefinitionService.Get(quality); diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs index 635c95909..dc800715e 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/BlacklistSpecification.cs @@ -37,7 +37,7 @@ public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase sear if (_blacklistService.Blacklisted(subject.Release.Title)) { - _logger.Trace("{0} is blacklisted", subject.Release.Title); + _logger.Trace("{0} is blacklisted, rejecting.", subject.Release.Title); return false; } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs index f43df2836..e087c6ef3 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/CutoffSpecification.cs @@ -33,6 +33,7 @@ public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase sear if (!_qualityUpgradableSpecification.CutoffNotMet(subject.Series.QualityProfile, file.Quality, subject.ParsedEpisodeInfo.Quality)) { + _logger.Trace("Cutoff already met, rejecting."); return false; } } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/NotInQueueSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/NotInQueueSpecification.cs index 3827f26a7..2b7f51ca0 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/NotInQueueSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/NotInQueueSpecification.cs @@ -40,7 +40,12 @@ public bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriter var queue = downloadClient.GetQueue().Select(q => q.RemoteEpisode); - return !IsInQueue(subject, queue); + if (IsInQueue(subject, queue)) + { + _logger.Trace("Already in queue, rejecting."); + } + + return true; } private bool IsInQueue(RemoteEpisode newEpisode, IEnumerable queue) diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs index afcb7149a..5d6a2da77 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/NotSampleSpecification.cs @@ -1,16 +1,24 @@ -using NzbDrone.Core.IndexerSearch.Definitions; +using NLog; +using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.Parser.Model; namespace NzbDrone.Core.DecisionEngine.Specifications { public class NotSampleSpecification : IDecisionEngineSpecification { + private readonly Logger _logger; public string RejectionReason { get { return "Sample"; } } + public NotSampleSpecification(Logger logger) + { + _logger = logger; + } + public bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) { if (subject.Release.Title.ToLower().Contains("sample") && subject.Release.Size < 70.Megabytes()) { + _logger.Trace("Sample release, rejecting."); return false; } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs index 808bba106..b2e034cac 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/HistorySpecification.cs @@ -51,6 +51,7 @@ public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase sear if (mostRecent != null && mostRecent.EventType == HistoryEventType.Grabbed) { + _logger.Trace("Latest history item is downloading, rejecting."); return false; } } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs index f0a133409..6d099eeba 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/RssSync/ProperSpecification.cs @@ -41,7 +41,7 @@ public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase sear { if (file.DateAdded < DateTime.Today.AddDays(-7)) { - _logger.Trace("Proper for old file, skipping: {0}", subject); + _logger.Trace("Proper for old file, rejecting: {0}", subject); return false; }