mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Fixed: SeasonPass didn't update Series monitored flag if only those were changed.
This commit is contained in:
parent
97cdcb8b19
commit
f7859c8eb5
@ -66,6 +66,18 @@ private void GivenSpecials()
|
||||
_series.Seasons = new List<Season>{new Season { Monitored = false, SeasonNumber = 0 }};
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_able_to_monitor_series_without_changing_episodes()
|
||||
{
|
||||
Subject.SetEpisodeMonitoredStatus(_series, null);
|
||||
|
||||
Mocker.GetMock<ISeriesService>()
|
||||
.Verify(v => v.UpdateSeries(It.IsAny<Series>()), Times.Once());
|
||||
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(v => v.UpdateEpisodes(It.IsAny<List<Episode>>()), Times.Never());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_able_to_monitor_all_episodes()
|
||||
{
|
||||
|
@ -25,6 +25,8 @@ public EpisodeMonitoredService(ISeriesService seriesService, IEpisodeService epi
|
||||
}
|
||||
|
||||
public void SetEpisodeMonitoredStatus(Series series, MonitoringOptions monitoringOptions)
|
||||
{
|
||||
if (monitoringOptions != null)
|
||||
{
|
||||
_logger.Debug("[{0}] Setting episode monitored status.", series.Title);
|
||||
|
||||
@ -90,10 +92,12 @@ public void SetEpisodeMonitoredStatus(Series series, MonitoringOptions monitorin
|
||||
}
|
||||
}
|
||||
|
||||
_seriesService.UpdateSeries(series);
|
||||
_episodeService.UpdateEpisodes(episodes);
|
||||
}
|
||||
|
||||
_seriesService.UpdateSeries(series);
|
||||
}
|
||||
|
||||
private void ToggleEpisodesMonitoredState(IEnumerable<Episode> episodes, bool monitored)
|
||||
{
|
||||
foreach (var episode in episodes)
|
||||
|
Loading…
Reference in New Issue
Block a user