From 1218dd255faf52bcd984a775193c8330bb8c1f04 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 27 Jul 2016 12:08:49 -0700 Subject: [PATCH] Fixed: Allow series to be added unmonitored through the API Closes #1404 --- src/NzbDrone.Api/Series/SeriesResource.cs | 5 +++++ src/NzbDrone.Core/Tv/SeriesService.cs | 1 - src/UI/AddSeries/SearchResultView.js | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Api/Series/SeriesResource.cs b/src/NzbDrone.Api/Series/SeriesResource.cs index 6a5f749a7..176377a86 100644 --- a/src/NzbDrone.Api/Series/SeriesResource.cs +++ b/src/NzbDrone.Api/Series/SeriesResource.cs @@ -9,6 +9,11 @@ namespace NzbDrone.Api.Series { public class SeriesResource : RestResource { + public SeriesResource() + { + Monitored = true; + } + //Todo: Sorters should be done completely on the client //Todo: Is there an easy way to keep IgnoreArticlesWhenSorting in sync between, Series, History, Missing? //Todo: We should get the entire Profile instead of ID and Name separately diff --git a/src/NzbDrone.Core/Tv/SeriesService.cs b/src/NzbDrone.Core/Tv/SeriesService.cs index 8a8966d93..941284407 100644 --- a/src/NzbDrone.Core/Tv/SeriesService.cs +++ b/src/NzbDrone.Core/Tv/SeriesService.cs @@ -77,7 +77,6 @@ public Series AddSeries(Series newSeries) _logger.Info("Adding Series {0} Path: [{1}]", newSeries, newSeries.Path); - newSeries.Monitored = true; newSeries.CleanTitle = newSeries.Title.CleanSeriesTitle(); newSeries.SortTitle = SeriesTitleNormalizer.Normalize(newSeries.Title, newSeries.TvdbId); newSeries.Added = DateTime.UtcNow; diff --git a/src/UI/AddSeries/SearchResultView.js b/src/UI/AddSeries/SearchResultView.js index 3423b3115..817ab78ea 100644 --- a/src/UI/AddSeries/SearchResultView.js +++ b/src/UI/AddSeries/SearchResultView.js @@ -189,7 +189,8 @@ var view = Marionette.ItemView.extend({ rootFolderPath : rootFolderPath, seasonFolder : seasonFolder, seriesType : seriesType, - addOptions : options + addOptions : options, + monitored : true }, { silent : true }); var self = this; @@ -284,4 +285,4 @@ var view = Marionette.ItemView.extend({ AsValidatedView.apply(view); -module.exports = view; \ No newline at end of file +module.exports = view;