From eae57077208ed991039fa6e24960e192cc8ad96e Mon Sep 17 00:00:00 2001 From: JackDandy Date: Mon, 5 Jul 2021 14:39:34 +0100 Subject: [PATCH] Fix package update detection. Change add DSM 7 error messages. --- CHANGES.md | 8 +++++++- sickbeard/clients/download_station.py | 14 ++++++++++++-- sickbeard/piper.py | 4 ++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 138679f..9d5c298 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,10 @@ -### 0.24.9 (2021-07-05 10:25:00 UTC) +### 0.24.10 (2021-07-06 20:00:00 UTC) + +* Fix package update detection +* Change add DSM 7 error messages + + +### 0.24.9 (2021-07-05 10:25:00 UTC) * Change add Synology DSM 7 compatibility * Fix exception when removing a show diff --git a/sickbeard/clients/download_station.py b/sickbeard/clients/download_station.py index a668bc2..10ddfa5 100644 --- a/sickbeard/clients/download_station.py +++ b/sickbeard/clients/download_station.py @@ -56,7 +56,15 @@ class DownloadStationAPI(GenericClient): 102: 'The requested API does not exist', 103: 'The requested method does not exist', 104: 'The requested version does not support the functionality', 105: 'The logged in session does not have permission', 106: 'Session timeout', - 107: 'Session interrupted by duplicate login', 119: 'SID not found', 120: 'Wrong parameter', + 107: 'Session interrupted by duplicate login', 108: 'Failed to upload the file', + 109: 'The network connection is unstable or the system is busy', + 110: 'The network connection is unstable or the system is busy', + 111: 'The network connection is unstable or the system is busy', + 114: 'Lost parameters for this API', 115: 'Not allowed to upload a file', + 116: 'Not allowed to perform for a demo site', + 117: 'The network connection is unstable or the system is busy', + 118: 'The network connection is unstable or the system is busy', + 119: 'Invalid session', 150: 'Request source IP does not match the login IP' } def _error(self, msg): @@ -399,7 +407,9 @@ class DownloadStationAPI(GenericClient): err_code = response.get('error', {}).get('code', -1) return self._error(self.common_errors.get(err_code) or { 400: 'No such account or incorrect password', 401: 'Account disabled', 402: 'Permission denied', - 403: '2-step verification code required', 404: 'Failed to authenticate 2-step verification code' + 403: '2-step verification code required', 404: 'Failed to authenticate 2-step verification code', + 406: 'Enforce to authenticate with 2-factor authentication code', 407: 'Blocked IP source', + 408: 'Expired password cannot change', 409: 'Expired password', 410: 'Password must be changed' }.get(err_code, 'No known API.Auth response')) return self.auth diff --git a/sickbeard/piper.py b/sickbeard/piper.py index cb50b3c..ae9a92d 100644 --- a/sickbeard/piper.py +++ b/sickbeard/piper.py @@ -37,12 +37,12 @@ def is_pip_ok(): pip_version, _, _ = _get_pip_version() if not pip_version: pip_ok = False - cmdline_runner([sys.executable, '-c', '"import ensurepip;ensurepip.bootstrap()"'], suppress_stderr=True) + cmdline_runner([sys.executable, '-c', 'import ensurepip;ensurepip.bootstrap()'], suppress_stderr=True) return pip_ok def _get_pip_version(): - return cmdline_runner([sys.executable, '-c', '"from pip import __version__ as v; print(v)"'], suppress_stderr=True) + return cmdline_runner([sys.executable, '-c', 'from pip import __version__ as v; print(v)'], suppress_stderr=True) def run_pip(pip_cmd, suppress_stderr=False):