From a087a464eb6d769bbe8522324a65659506e18650 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Fri, 29 Sep 2017 00:20:06 +0100 Subject: [PATCH 1/2] Fix Media Providers/Custom Newznab tab action 'Delete' then 'Save Changes'. --- CHANGES.md | 7 ++++++- sickbeard/webserve.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9eb10446..8b0e3d67 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.12.29 (2017-09-17 09:00:00 UTC) +### 0.12.30 (2017-09-29 00:20:00 UTC) + +* Fix Media Providers/Custom Newznab tab action 'Delete' then 'Save Changes' + + +### 0.12.29 (2017-09-17 09:00:00 UTC) * Fix provider nCore * Change .torrent checker due to files created with qB 3.3.16 (affects nCore and NBL) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 0dd045d5..440800ee 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -5364,7 +5364,8 @@ class ConfigProviders(Config): provider_list.append(src_name) src_enabled = bool(config.to_int(src_enabled)) - if '' != getattr(sources[src_name], 'enabled', '') and sources[src_name].is_enabled() != src_enabled: + if src_name in sources and '' != getattr(sources[src_name], 'enabled', '') \ + and sources[src_name].is_enabled() != src_enabled: sources[src_name].enabled = src_enabled if not reload_page and sickbeard.GenericProvider.TORRENT == sources[src_name].providerType: reload_page = True From df7938a5162a2dd0ed07ccdaa70b0fb4617d3049 Mon Sep 17 00:00:00 2001 From: Prinz23 Date: Wed, 27 Sep 2017 22:40:44 +0200 Subject: [PATCH 2/2] Fix enforce value API expects for paused show flag. --- CHANGES.md | 1 + sickbeard/tv.py | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 8b0e3d67..c71e4b21 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ ### 0.12.30 (2017-09-29 00:20:00 UTC) * Fix Media Providers/Custom Newznab tab action 'Delete' then 'Save Changes' +* Fix enforce value API expects for paused show flag ### 0.12.29 (2017-09-17 09:00:00 UTC) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 634d4259..5715a7f3 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -136,7 +136,6 @@ class TVShow(object): status = property(lambda self: self._status, dirty_setter('_status')) airs = property(lambda self: self._airs, dirty_setter('_airs')) startyear = property(lambda self: self._startyear, dirty_setter('_startyear')) - paused = property(lambda self: self._paused, dirty_setter('_paused')) air_by_date = property(lambda self: self._air_by_date, dirty_setter('_air_by_date')) subtitles = property(lambda self: self._subtitles, dirty_setter('_subtitles')) dvdorder = property(lambda self: self._dvdorder, dirty_setter('_dvdorder')) @@ -151,6 +150,20 @@ class TVShow(object): overview = property(lambda self: self._overview, dirty_setter('_overview')) tag = property(lambda self: self._tag, dirty_setter('_tag')) + @property + def paused(self): + return self._paused + + @paused.setter + def paused(self, value): + if value != self._paused: + if isinstance(value, bool) or (isinstance(value, (int, long)) and value in [0, 1]): + self._paused = int(value) + self.dirty = True + else: + logger.log('tried to set paused property to invalid value: %s of type: %s' % (value, type(value)), + logger.ERROR) + @property def ids(self): if not self._mapped_ids: