mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
Fixed: Selecting a release from Interactive Search with an unknown episode
This commit is contained in:
parent
88dfa14046
commit
9e45b9e808
1 changed files with 19 additions and 1 deletions
|
@ -103,6 +103,24 @@ namespace Sonarr.Api.V3.Indexers
|
||||||
throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to find matching series and episodes");
|
throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to find matching series and episodes");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (remoteEpisode.Episodes.Empty())
|
||||||
|
{
|
||||||
|
var episodes = _parsingService.GetEpisodes(remoteEpisode.ParsedEpisodeInfo, remoteEpisode.Series, true);
|
||||||
|
|
||||||
|
if (episodes.Empty() && release.EpisodeId.HasValue)
|
||||||
|
{
|
||||||
|
var episode = _episodeService.GetEpisode(release.EpisodeId.Value);
|
||||||
|
|
||||||
|
episodes = new List<Episode>{episode};
|
||||||
|
}
|
||||||
|
|
||||||
|
remoteEpisode.Episodes = episodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (remoteEpisode.Episodes.Empty())
|
||||||
|
{
|
||||||
|
throw new NzbDroneClientException(HttpStatusCode.NotFound, "Unable to parse episodes in the release");
|
||||||
|
}
|
||||||
|
|
||||||
_downloadService.DownloadReport(remoteEpisode);
|
_downloadService.DownloadReport(remoteEpisode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue