mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
Blacklist is now used when processing results
This commit is contained in:
+14
-1
@@ -1,4 +1,6 @@
|
||||
using NLog;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Download.Clients.Sabnzbd;
|
||||
using NzbDrone.Core.History;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
@@ -9,12 +11,17 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||
{
|
||||
private readonly IHistoryService _historyService;
|
||||
private readonly QualityUpgradableSpecification _qualityUpgradableSpecification;
|
||||
private readonly IProvideDownloadClient _downloadClientProvider;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public UpgradeHistorySpecification(IHistoryService historyService, QualityUpgradableSpecification qualityUpgradableSpecification, Logger logger)
|
||||
public UpgradeHistorySpecification(IHistoryService historyService,
|
||||
QualityUpgradableSpecification qualityUpgradableSpecification,
|
||||
IProvideDownloadClient downloadClientProvider,
|
||||
Logger logger)
|
||||
{
|
||||
_historyService = historyService;
|
||||
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
||||
_downloadClientProvider = downloadClientProvider;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
@@ -34,6 +41,12 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_downloadClientProvider.GetDownloadClient().GetType() == typeof (SabnzbdClient))
|
||||
{
|
||||
_logger.Trace("Skipping history check in favour of blacklist");
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (var episode in subject.Episodes)
|
||||
{
|
||||
var bestQualityInHistory = _historyService.GetBestQualityInHistory(episode.Id);
|
||||
|
||||
Reference in New Issue
Block a user