mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
single broken doesnt break the whole decision process
This commit is contained in:
parent
fe0f88f5d5
commit
6d12a85756
4 changed files with 52 additions and 16 deletions
|
@ -42,23 +42,38 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
{
|
||||
foreach (var report in reports)
|
||||
{
|
||||
var parsedEpisodeInfo = Parser.Parser.ParseTitle(report.Title);
|
||||
DownloadDecision decision = null;
|
||||
|
||||
if (parsedEpisodeInfo != null)
|
||||
try
|
||||
{
|
||||
var remoteEpisode = _parsingService.Map(parsedEpisodeInfo);
|
||||
remoteEpisode.Report = report;
|
||||
var parsedEpisodeInfo = Parser.Parser.ParseTitle(report.Title);
|
||||
|
||||
if (remoteEpisode.Series != null)
|
||||
if (parsedEpisodeInfo != null)
|
||||
{
|
||||
yield return GetDecisionForReport(remoteEpisode, searchDefinition);
|
||||
}
|
||||
else
|
||||
{
|
||||
yield return new DownloadDecision(remoteEpisode, "Unknown Series");
|
||||
var remoteEpisode = _parsingService.Map(parsedEpisodeInfo);
|
||||
remoteEpisode.Report = report;
|
||||
|
||||
if (remoteEpisode.Series != null)
|
||||
{
|
||||
decision = GetDecisionForReport(remoteEpisode, searchDefinition);
|
||||
}
|
||||
else
|
||||
{
|
||||
decision = new DownloadDecision(remoteEpisode, "Unknown Series");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorException("Couldn't process report.", e);
|
||||
}
|
||||
|
||||
if (decision != null)
|
||||
{
|
||||
yield return decision;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private DownloadDecision GetDecisionForReport(RemoteEpisode remoteEpisode, SearchDefinitionBase searchDefinition = null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue