|
|
@ -11,17 +11,19 @@ namespace NzbDrone.Core.Providers.DecisionEngine
|
|
|
|
private readonly UpgradeDiskSpecification _upgradeDiskSpecification;
|
|
|
|
private readonly UpgradeDiskSpecification _upgradeDiskSpecification;
|
|
|
|
private readonly AcceptableSizeSpecification _acceptableSizeSpecification;
|
|
|
|
private readonly AcceptableSizeSpecification _acceptableSizeSpecification;
|
|
|
|
private readonly AlreadyInQueueSpecification _alreadyInQueueSpecification;
|
|
|
|
private readonly AlreadyInQueueSpecification _alreadyInQueueSpecification;
|
|
|
|
|
|
|
|
private readonly RetentionSpecification _retentionSpecification;
|
|
|
|
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
|
|
|
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
|
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
[Inject]
|
|
|
|
public AllowedDownloadSpecification(QualityAllowedByProfileSpecification qualityAllowedByProfileSpecification,
|
|
|
|
public AllowedDownloadSpecification(QualityAllowedByProfileSpecification qualityAllowedByProfileSpecification,
|
|
|
|
UpgradeDiskSpecification upgradeDiskSpecification, AcceptableSizeSpecification acceptableSizeSpecification,
|
|
|
|
UpgradeDiskSpecification upgradeDiskSpecification, AcceptableSizeSpecification acceptableSizeSpecification,
|
|
|
|
AlreadyInQueueSpecification alreadyInQueueSpecification)
|
|
|
|
AlreadyInQueueSpecification alreadyInQueueSpecification, RetentionSpecification retentionSpecification)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_qualityAllowedByProfileSpecification = qualityAllowedByProfileSpecification;
|
|
|
|
_qualityAllowedByProfileSpecification = qualityAllowedByProfileSpecification;
|
|
|
|
_upgradeDiskSpecification = upgradeDiskSpecification;
|
|
|
|
_upgradeDiskSpecification = upgradeDiskSpecification;
|
|
|
|
_acceptableSizeSpecification = acceptableSizeSpecification;
|
|
|
|
_acceptableSizeSpecification = acceptableSizeSpecification;
|
|
|
|
_alreadyInQueueSpecification = alreadyInQueueSpecification;
|
|
|
|
_alreadyInQueueSpecification = alreadyInQueueSpecification;
|
|
|
|
|
|
|
|
_retentionSpecification = retentionSpecification;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public AllowedDownloadSpecification()
|
|
|
|
public AllowedDownloadSpecification()
|
|
|
@ -32,6 +34,7 @@ namespace NzbDrone.Core.Providers.DecisionEngine
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!_qualityAllowedByProfileSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
if (!_qualityAllowedByProfileSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
if (!_upgradeDiskSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
if (!_upgradeDiskSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
|
|
|
|
if (!_retentionSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
if (!_acceptableSizeSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
if (!_acceptableSizeSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
if (_alreadyInQueueSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
if (_alreadyInQueueSpecification.IsSatisfiedBy(subject)) return false;
|
|
|
|
|
|
|
|
|
|
|
|