You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
761 B
33 lines
761 B
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);
|
|
}
|
|
|
|
}
|
|
}
|