sonarr-repo-only/NzbDrone.Core/DecisionEngine/AlreadyInQueueSpecification.cs

33 lines
780 B
C#
Raw Normal View History

using System.Linq;
using NLog;
using NzbDrone.Core.Download;
using NzbDrone.Core.Model;
2013-02-19 02:19:38 +00:00
using NzbDrone.Core.Providers;
2013-02-19 02:19:38 +00:00
namespace NzbDrone.Core.DecisionEngine
{
public class AlreadyInQueueSpecification
{
private readonly DownloadProvider _downloadProvider;
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public AlreadyInQueueSpecification(DownloadProvider downloadProvider)
{
_downloadProvider = downloadProvider;
}
public AlreadyInQueueSpecification()
{
}
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
{
return _downloadProvider.GetActiveDownloadClient().IsInQueue(subject);
}
}
}