diff --git a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 68f5bd6b3..2235812d2 100644 --- a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -189,6 +189,7 @@ + @@ -211,7 +212,7 @@ - + diff --git a/NzbDrone.Core.Test/TvTests/SeriesServiceFixture.cs b/NzbDrone.Core.Test/TvTests/SeriesServiceTests/AddSeriesFixture.cs similarity index 90% rename from NzbDrone.Core.Test/TvTests/SeriesServiceFixture.cs rename to NzbDrone.Core.Test/TvTests/SeriesServiceTests/AddSeriesFixture.cs index aea6ff928..ab33ff072 100644 Binary files a/NzbDrone.Core.Test/TvTests/SeriesServiceFixture.cs and b/NzbDrone.Core.Test/TvTests/SeriesServiceTests/AddSeriesFixture.cs differ diff --git a/NzbDrone.Core.Test/TvTests/SeriesServiceTests/UpdateSeriesFixture.cs b/NzbDrone.Core.Test/TvTests/SeriesServiceTests/UpdateSeriesFixture.cs new file mode 100644 index 000000000..903e98102 Binary files /dev/null and b/NzbDrone.Core.Test/TvTests/SeriesServiceTests/UpdateSeriesFixture.cs differ diff --git a/NzbDrone.Core/Tv/SeriesService.cs b/NzbDrone.Core/Tv/SeriesService.cs index 95daaa417..1ada36255 100644 --- a/NzbDrone.Core/Tv/SeriesService.cs +++ b/NzbDrone.Core/Tv/SeriesService.cs @@ -119,6 +119,18 @@ namespace NzbDrone.Core.Tv public Series UpdateSeries(Series series) { + var storedSeries = GetSeries(series.Id); + + foreach (var season in series.Seasons) + { + var storedSeason = storedSeries.Seasons.SingleOrDefault(s => s.SeasonNumber == season.SeasonNumber); + + if (storedSeason != null && season.Monitored != storedSeason.Monitored) + { + _episodeService.SetEpisodeMonitoredBySeason(series.Id, season.SeasonNumber, season.Monitored); + } + } + return _seriesRepository.Update(series); }