1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-01-21 06:39:06 +00:00

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

View file

@ -220,7 +220,12 @@ namespace NzbDrone.Core.Tv
foreach (var episode in GetEpisodesByFileId(message.EpisodeFile.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);
}
}