mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
Do not unmonitor episodes after using Manual File Import
This commit is contained in:
parent
dd3899806b
commit
77fdebc366
@ -119,5 +119,20 @@ public void should_leave_monitored_to_true_if_autoUnmonitor_is_true_and_is_for_a
|
||||
Mocker.GetMock<IEpisodeRepository>()
|
||||
.Verify(v => v.ClearFileId(It.IsAny<Episode>(), false), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_leave_monitored_to_true_if_autoUnmonitor_is_true_and_is_for_manual_override()
|
||||
{
|
||||
GivenSingleEpisodeFile();
|
||||
|
||||
Mocker.GetMock<IConfigService>()
|
||||
.SetupGet(s => s.AutoUnmonitorPreviouslyDownloadedEpisodes)
|
||||
.Returns(true);
|
||||
|
||||
Subject.Handle(new EpisodeFileDeletedEvent(_episodeFile, DeleteMediaFileReason.ManualOverride));
|
||||
|
||||
Mocker.GetMock<IEpisodeRepository>()
|
||||
.Verify(v => v.ClearFileId(It.IsAny<Episode>(), false), Times.Once());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ public void Handle(EpisodeFileDeletedEvent message)
|
||||
{
|
||||
_logger.Debug("Detaching episode {0} from file.", episode.Id);
|
||||
|
||||
var unmonitorForReason = message.Reason != DeleteMediaFileReason.Upgrade ||
|
||||
var unmonitorForReason = message.Reason != DeleteMediaFileReason.Upgrade &&
|
||||
message.Reason != DeleteMediaFileReason.ManualOverride;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user