Fixed: Unmonitor episodes after using Manual File Import

Closes #4638
This commit is contained in:
Mark McDowall 2021-08-29 19:54:05 -07:00
parent e19d4cf85b
commit 5c4687e0d9
1 changed files with 6 additions and 1 deletions

View File

@ -220,7 +220,12 @@ namespace NzbDrone.Core.Tv
foreach (var episode in GetEpisodesByFileId(message.EpisodeFile.Id)) foreach (var episode in GetEpisodesByFileId(message.EpisodeFile.Id))
{ {
_logger.Debug("Detaching episode {0} from file.", episode.Id); _logger.Debug("Detaching episode {0} from file.", episode.Id);
_episodeRepository.ClearFileId(episode, message.Reason != DeleteMediaFileReason.Upgrade && _configService.AutoUnmonitorPreviouslyDownloadedEpisodes);
var unmonitorForReason = message.Reason != DeleteMediaFileReason.Upgrade ||
message.Reason != DeleteMediaFileReason.ManualOverride;
_episodeRepository.ClearFileId(episode, unmonitorForReason && _configService.AutoUnmonitorPreviouslyDownloadedEpisodes);
} }
} }