2012-02-07 08:08:07 +03:00
|
|
|
using System.Linq;
|
|
|
|
using NLog;
|
2013-02-24 22:18:48 +03:00
|
|
|
using NzbDrone.Core.Download;
|
2012-02-07 08:08:07 +03:00
|
|
|
using NzbDrone.Core.Model;
|
2013-02-19 05:19:38 +03:00
|
|
|
using NzbDrone.Core.Providers;
|
2012-02-07 08:08:07 +03:00
|
|
|
|
2013-02-19 05:19:38 +03:00
|
|
|
namespace NzbDrone.Core.DecisionEngine
|
2012-02-07 08:08:07 +03:00
|
|
|
{
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|