From 9039d7e694ada8375bcec7c6c08bd720a89452a6 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 25 Dec 2015 18:31:53 -0800 Subject: [PATCH] Fixed: Show a better error message when no episodes are parsed in a release --- .../DecisionEngine/DownloadDecisionMaker.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs index a1a87ec36..cc9c1f59a 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs @@ -78,14 +78,18 @@ private IEnumerable GetDecisions(List reports, Se var remoteEpisode = _parsingService.Map(parsedEpisodeInfo, report.TvdbId, report.TvRageId, searchCriteria); remoteEpisode.Release = report; - if (remoteEpisode.Series != null) + if (remoteEpisode.Series == null) { - remoteEpisode.DownloadAllowed = remoteEpisode.Episodes.Any(); - decision = GetDecisionForReport(remoteEpisode, searchCriteria); + decision = new DownloadDecision(remoteEpisode, new Rejection("Unknown Series")); + } + else if (remoteEpisode.Episodes.Empty()) + { + decision = new DownloadDecision(remoteEpisode, new Rejection("Unable to parse episodes from release name")); } else { - decision = new DownloadDecision(remoteEpisode, new Rejection("Unknown Series")); + remoteEpisode.DownloadAllowed = remoteEpisode.Episodes.Any(); + decision = GetDecisionForReport(remoteEpisode, searchCriteria); } } }