New: Implemented Torrent Download Clients: uTorrent, Transmission and Deluge. And several public and private Torrent Indexers.

This commit is contained in:
MythJuha
2014-05-13 19:57:46 +02:00
committed by Taloth Saldono
parent ffa814f387
commit 67cd5703a1
134 changed files with 11018 additions and 99 deletions
@@ -0,0 +1,51 @@
using NLog;
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.DecisionEngine.Specifications.Search
{
public class TorrentSeedingSpecification : IDecisionEngineSpecification
{
private readonly Logger _logger;
public TorrentSeedingSpecification(Logger logger)
{
_logger = logger;
}
public string RejectionReason
{
get
{
return "Not enough Torrent seeders";
}
}
public RejectionType Type
{
get
{
return RejectionType.Permanent;
}
}
public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase searchCriteria)
{
var torrentInfo = remoteEpisode.Release as TorrentInfo;
if (torrentInfo == null)
{
return Decision.Accept();
}
if (torrentInfo.Seeds != null && torrentInfo.Seeds < 1)
{
_logger.Debug("Only {0} seeders, skipping.", torrentInfo.Seeds);
return Decision.Reject("No seeders");
}
return Decision.Accept();
}
}
}