Fixed: Saving indexer flags when manual importing from queue

This commit is contained in:
Bogdan 2024-07-31 10:52:17 +03:00
parent b1527f9abb
commit 1c1b1073b2
1 changed files with 1 additions and 6 deletions

View File

@ -97,6 +97,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
episodeFile.ReleaseGroup = localEpisode.ReleaseGroup;
episodeFile.ReleaseHash = localEpisode.ReleaseHash;
episodeFile.Languages = localEpisode.Languages;
episodeFile.IndexerFlags = localEpisode.IndexerFlags;
// Prefer the release type from the download client, folder and finally the file so we have the most accurate information.
episodeFile.ReleaseType = localEpisode.DownloadClientEpisodeInfo?.ReleaseType ??
@ -109,11 +110,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
.OrderByDescending(h => h.Date)
.FirstOrDefault(h => h.EventType == EpisodeHistoryEventType.Grabbed);
if (Enum.TryParse(grabHistory?.Data.GetValueOrDefault("indexerFlags"), true, out IndexerFlags flags))
{
episodeFile.IndexerFlags = flags;
}
// Prefer the release type from the grabbed history
if (Enum.TryParse(grabHistory?.Data.GetValueOrDefault("releaseType"), true, out ReleaseType releaseType))
{
@ -122,7 +118,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
}
else
{
episodeFile.IndexerFlags = localEpisode.IndexerFlags;
episodeFile.ReleaseType = localEpisode.ReleaseType;
}