mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 21:39:34 +02:00
New: Rewrite of download decision engine.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using Ninject;
|
||||
using NzbDrone.Core.Model;
|
||||
|
||||
namespace NzbDrone.Core.Providers.DecisionEngine
|
||||
{
|
||||
public class AlreadyInQueueSpecification
|
||||
{
|
||||
private readonly DownloadProvider _downloadProvider;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
[Inject]
|
||||
public AlreadyInQueueSpecification(DownloadProvider downloadProvider)
|
||||
{
|
||||
_downloadProvider = downloadProvider;
|
||||
|
||||
}
|
||||
|
||||
public AlreadyInQueueSpecification()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
|
||||
{
|
||||
return _downloadProvider.GetActiveDownloadClient().IsInQueue(subject);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user