Fixed: Override and grab releases with Custom Formats

This commit is contained in:
Mark McDowall 2023-04-04 10:28:35 -07:00
parent ba3dfdc147
commit 7fcb6b80b4
1 changed files with 15 additions and 2 deletions

View File

@ -89,9 +89,22 @@ namespace Sonarr.Api.V3.Indexers
Ensure.That(release.Languages, () => release.Languages).IsNotNull(); Ensure.That(release.Languages, () => release.Languages).IsNotNull();
// Clone the remote episode so we don't overwrite anything on the original // Clone the remote episode so we don't overwrite anything on the original
remoteEpisode = remoteEpisode.JsonClone(); remoteEpisode = new RemoteEpisode
{
Release = remoteEpisode.Release,
ParsedEpisodeInfo = remoteEpisode.ParsedEpisodeInfo.JsonClone(),
SceneMapping = remoteEpisode.SceneMapping,
MappedSeasonNumber = remoteEpisode.MappedSeasonNumber,
EpisodeRequested = remoteEpisode.EpisodeRequested,
DownloadAllowed = remoteEpisode.DownloadAllowed,
SeedConfiguration = remoteEpisode.SeedConfiguration,
CustomFormats = remoteEpisode.CustomFormats,
CustomFormatScore = remoteEpisode.CustomFormatScore,
SeriesMatchType = remoteEpisode.SeriesMatchType,
ReleaseSource = remoteEpisode.ReleaseSource
};
remoteEpisode.Series = _seriesService.GetSeries(release.SeriesId.Value); remoteEpisode.Series = _seriesService.GetSeries(release.SeriesId!.Value);
remoteEpisode.Episodes = _episodeService.GetEpisodes(release.EpisodeIds); remoteEpisode.Episodes = _episodeService.GetEpisodes(release.EpisodeIds);
remoteEpisode.ParsedEpisodeInfo.Quality = release.Quality; remoteEpisode.ParsedEpisodeInfo.Quality = release.Quality;
remoteEpisode.Languages = release.Languages; remoteEpisode.Languages = release.Languages;