Fixed: Interactive search results failing to show when processing failed

Closes #3377
This commit is contained in:
Mark McDowall 2019-11-08 09:12:42 -08:00
parent 70bb4d71e6
commit 4123745a6b
2 changed files with 20 additions and 9 deletions

View File

@ -114,14 +114,27 @@ namespace NzbDrone.Core.DecisionEngine
} }
} }
if (parsedEpisodeInfo == null || parsedEpisodeInfo.SeriesTitle.IsNullOrWhiteSpace() && searchCriteria != null) if (searchCriteria != null)
{ {
var remoteEpisode = new RemoteEpisode if (parsedEpisodeInfo == null)
{ {
Release = report parsedEpisodeInfo = new ParsedEpisodeInfo
}; {
Language = LanguageParser.ParseLanguage(report.Title),
Quality = QualityParser.ParseQuality(report.Title)
};
}
decision = new DownloadDecision(remoteEpisode, new Rejection("Unable to parse release")); if (parsedEpisodeInfo.SeriesTitle.IsNullOrWhiteSpace())
{
var remoteEpisode = new RemoteEpisode
{
Release = report,
ParsedEpisodeInfo = parsedEpisodeInfo
};
decision = new DownloadDecision(remoteEpisode, new Rejection("Unable to parse release"));
}
} }
} }
catch (Exception e) catch (Exception e)

View File

@ -163,9 +163,8 @@ namespace Sonarr.Api.V3.Indexers
catch (Exception ex) catch (Exception ex)
{ {
_logger.Error(ex, "Episode search failed: " + ex.Message); _logger.Error(ex, "Episode search failed: " + ex.Message);
throw new NzbDroneClientException(HttpStatusCode.InternalServerError, ex.Message);
} }
return new List<ReleaseResource>();
} }
private List<ReleaseResource> GetSeasonReleases(int seriesId, int seasonNumber) private List<ReleaseResource> GetSeasonReleases(int seriesId, int seasonNumber)
@ -184,9 +183,8 @@ namespace Sonarr.Api.V3.Indexers
catch (Exception ex) catch (Exception ex)
{ {
_logger.Error(ex, "Season search failed: " + ex.Message); _logger.Error(ex, "Season search failed: " + ex.Message);
throw new NzbDroneClientException(HttpStatusCode.InternalServerError, ex.Message);
} }
return new List<ReleaseResource>();
} }
private List<ReleaseResource> GetRss() private List<ReleaseResource> GetRss()