added sample check for remote episode.

This commit is contained in:
kay.one 2013-09-14 12:50:38 -07:00
parent b07bc713bb
commit 1665bfa6ac
4 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,20 @@
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.DecisionEngine.Specifications
{
public class NotSampleSpecification : IDecisionEngineSpecification
{
public string RejectionReason { get { return "Sample"; } }
public bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
{
if (subject.Release.Title.ToLower().Contains("sample") && subject.Release.Size < 70.Megabytes())
{
return false;
}
return true;
}
}
}

View File

@ -188,6 +188,7 @@
<Compile Include="DecisionEngine\IDecisionEngineSpecification.cs" />
<Compile Include="DecisionEngine\Specifications\CutoffSpecification.cs" />
<Compile Include="DecisionEngine\Specifications\NotRestrictedReleaseSpecification.cs" />
<Compile Include="DecisionEngine\Specifications\NotSampleSpecification.cs" />
<Compile Include="DecisionEngine\Specifications\RssSync\ProperSpecification.cs" />
<Compile Include="DecisionEngine\Specifications\Search\SeasonMatchSpecification.cs" />
<Compile Include="DecisionEngine\Specifications\Search\DailyEpisodeMatchSpecification.cs" />

View File

@ -34,7 +34,6 @@ namespace NzbDrone.Core.Update
if (latestAvailable == null)
{
_logger.ProgressDebug("No update available.");
return null;
}
return latestAvailable;

View File

@ -11,6 +11,7 @@ define(
if (!img.src.contains(placeHolder)) {
img.src = placeHolder;
}
img.onerror = null;
};
Handlebars.registerHelper('defaultImg', function () {