mirror of
https://github.com/Sonarr/Sonarr
synced 2025-01-21 06:39:06 +00:00
parent
e19d4cf85b
commit
5c4687e0d9
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue