1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/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 05:19:38 +03:00
using NzbDrone.Core.Providers;
2013-02-19 05:19:38 +03: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);
}
}
}