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,16 +114,29 @@ namespace NzbDrone.Core.DecisionEngine
} }
} }
if (parsedEpisodeInfo == null || parsedEpisodeInfo.SeriesTitle.IsNullOrWhiteSpace() && searchCriteria != null) if (searchCriteria != null)
{
if (parsedEpisodeInfo == null)
{
parsedEpisodeInfo = new ParsedEpisodeInfo
{
Language = LanguageParser.ParseLanguage(report.Title),
Quality = QualityParser.ParseQuality(report.Title)
};
}
if (parsedEpisodeInfo.SeriesTitle.IsNullOrWhiteSpace())
{ {
var remoteEpisode = new RemoteEpisode var remoteEpisode = new RemoteEpisode
{ {
Release = report Release = report,
ParsedEpisodeInfo = parsedEpisodeInfo
}; };
decision = new DownloadDecision(remoteEpisode, new Rejection("Unable to parse release")); decision = new DownloadDecision(remoteEpisode, new Rejection("Unable to parse release"));
} }
} }
}
catch (Exception e) catch (Exception e)
{ {
_logger.Error(e, "Couldn't process release."); _logger.Error(e, "Couldn't process release.");

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()