added sample check for remote episode.

pull/4/head
kay.one 11 years ago
parent b07bc713bb
commit 1665bfa6ac

@ -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;
}
}
}

@ -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" />

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

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

Loading…
Cancel
Save