Fixed: SeasonPass didn't update Series monitored flag if only those were changed.

pull/886/head
Taloth Saldono 9 years ago
parent 97cdcb8b19
commit f7859c8eb5

@ -66,6 +66,18 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeMonitoredServiceTests
_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 @@ namespace NzbDrone.Core.Tv
}
public void SetEpisodeMonitoredStatus(Series series, MonitoringOptions monitoringOptions)
{
if (monitoringOptions != null)
{
_logger.Debug("[{0}] Setting episode monitored status.", series.Title);
@ -90,10 +92,12 @@ namespace NzbDrone.Core.Tv
}
}
_seriesService.UpdateSeries(series);
_episodeService.UpdateEpisodes(episodes);
}
_seriesService.UpdateSeries(series);
}
private void ToggleEpisodesMonitoredState(IEnumerable<Episode> episodes, bool monitored)
{
foreach (var episode in episodes)

Loading…
Cancel
Save