fixed rebase issues.

pull/30/head
Keivan Beigi 11 years ago
parent 82b06bab7a
commit 771e366441

@ -13,8 +13,8 @@ namespace NzbDrone.Core.DecisionEngine
{ {
public interface IMakeDownloadDecision public interface IMakeDownloadDecision
{ {
List<DownloadDecision> GetRssDecision(List<ReportInfo> reports); List<DownloadDecision> GetRssDecision(List<ReleaseInfo> reports);
List<DownloadDecision> GetSearchDecision(List<ReportInfo> reports, SearchCriteriaBase searchCriteriaBase); List<DownloadDecision> GetSearchDecision(List<ReleaseInfo> reports, SearchCriteriaBase searchCriteriaBase);
} }
public class DownloadDecisionMaker : IMakeDownloadDecision public class DownloadDecisionMaker : IMakeDownloadDecision
@ -30,17 +30,17 @@ namespace NzbDrone.Core.DecisionEngine
_logger = logger; _logger = logger;
} }
public List<DownloadDecision> GetRssDecision(List<ReportInfo> reports) public List<DownloadDecision> GetRssDecision(List<ReleaseInfo> reports)
{ {
return GetDecisions(reports).ToList(); return GetDecisions(reports).ToList();
} }
public List<DownloadDecision> GetSearchDecision(List<ReportInfo> reports, SearchCriteriaBase searchCriteriaBase) public List<DownloadDecision> GetSearchDecision(List<ReleaseInfo> reports, SearchCriteriaBase searchCriteriaBase)
{ {
return GetDecisions(reports, searchCriteriaBase).ToList(); return GetDecisions(reports, searchCriteriaBase).ToList();
} }
private IEnumerable<DownloadDecision> GetDecisions(List<ReportInfo> reports, SearchCriteriaBase searchCriteria = null) private IEnumerable<DownloadDecision> GetDecisions(List<ReleaseInfo> reports, SearchCriteriaBase searchCriteria = null)
{ {
if (reports.Any()) if (reports.Any())
{ {

@ -131,12 +131,10 @@ namespace NzbDrone.Core.IndexerSearch
private List<DownloadDecision> Dispatch(Func<IIndexer, IEnumerable<ReleaseInfo>> searchAction, SearchCriteriaBase criteriaBase) private List<DownloadDecision> Dispatch(Func<IIndexer, IEnumerable<ReleaseInfo>> searchAction, SearchCriteriaBase criteriaBase)
{ {
var indexers = _indexerService.GetAvailableIndexers().ToList(); var indexers = _indexerService.GetAvailableIndexers().ToList();
var reports = new List<ReportInfo>();
var reports = new List<ReleaseInfo>(); var reports = new List<ReleaseInfo>();
_logger.ProgressInfo("Searching {0} indexers for {1}", indexers.Count, criteriaBase); _logger.ProgressInfo("Searching {0} indexers for {1}", indexers.Count, criteriaBase);
var reports = new List<ReportInfo>();
var taskList = new List<Task>(); var taskList = new List<Task>();
var taskFactory = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.None); var taskFactory = new TaskFactory(TaskCreationOptions.LongRunning, TaskContinuationOptions.None);

@ -2,8 +2,6 @@ using System;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Xml.Linq; using System.Xml.Linq;
using NLog;
using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.Indexers.NzbClub namespace NzbDrone.Core.Indexers.NzbClub
{ {
@ -15,8 +13,8 @@ namespace NzbDrone.Core.Indexers.NzbClub
protected override long GetSize(XElement item) protected override long GetSize(XElement item)
{ {
logger = LogManager.GetCurrentClassLogger(); var match = SizeRegex.Match(item.Description());
if (match.Success && match.Groups["size"].Success) if (match.Success && match.Groups["size"].Success)
{ {
return ParseSize(match.Groups["size"].Value); return ParseSize(match.Groups["size"].Value);

Loading…
Cancel
Save