Implement Release Parsing, Decision Engine, and Downloading (#35)

* Implement Parsing, Decision Engine, and Downloading
This commit is contained in:
Qstick
2017-08-13 22:58:42 -04:00
committed by GitHub
parent 5556989324
commit 1e4d9480e9
191 changed files with 2604 additions and 2755 deletions
@@ -1,4 +1,4 @@
using NLog;
using NLog;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Parser.Model;
@@ -20,20 +20,20 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
public RejectionType Type => RejectionType.Permanent;
public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
public virtual Decision IsSatisfiedBy(RemoteAlbum subject, SearchCriteriaBase searchCriteria)
{
var delayProfile = _delayProfileService.BestForTags(subject.Series.Tags);
var delayProfile = _delayProfileService.BestForTags(subject.Artist.Tags);
if (subject.Release.DownloadProtocol == DownloadProtocol.Usenet && !delayProfile.EnableUsenet)
{
_logger.Debug("[{0}] Usenet is not enabled for this series", subject.Release.Title);
return Decision.Reject("Usenet is not enabled for this series");
_logger.Debug("[{0}] Usenet is not enabled for this artist", subject.Release.Title);
return Decision.Reject("Usenet is not enabled for this artist");
}
if (subject.Release.DownloadProtocol == DownloadProtocol.Torrent && !delayProfile.EnableTorrent)
{
_logger.Debug("[{0}] Torrent is not enabled for this series", subject.Release.Title);
return Decision.Reject("Torrent is not enabled for this series");
_logger.Debug("[{0}] Torrent is not enabled for this artist", subject.Release.Title);
return Decision.Reject("Torrent is not enabled for this artist");
}
return Decision.Accept();