diff --git a/CHANGES.md b/CHANGES.md index 825c0c65..991e3f35 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,10 @@ -### 3.30.4 (2023-10-12 11:50:00 UTC) +### 3.30.5 (2023-12-10 05:00:00 UTC) + +* Change allow Python 3.12.1 +* Change improve Emby status check + + +### 3.30.4 (2023-10-12 11:50:00 UTC) * Add metadata source attribution in footer diff --git a/sickgear.py b/sickgear.py index 8dc0f466..104154f1 100755 --- a/sickgear.py +++ b/sickgear.py @@ -38,7 +38,7 @@ warnings.filterwarnings('ignore', message='.*deprecated in cryptography.*') versions = [((3, 8, 2), (3, 8, 18)), ((3, 9, 0), (3, 9, 2)), ((3, 9, 4), (3, 9, 18)), - ((3, 10, 0), (3, 12, 0))] # inclusive version ranges + ((3, 10, 0), (3, 12, 1))] # inclusive version ranges if not any(list(map(lambda v: v[0] <= sys.version_info[:3] <= v[1], versions))) and not int(os.environ.get('PYT', 0)): major, minor, micro = sys.version_info[:3] print('Python %s.%s.%s detected.' % (major, minor, micro)) diff --git a/sickgear/notifiers/emby.py b/sickgear/notifiers/emby.py index 196f23b4..a95cf115 100644 --- a/sickgear/notifiers/emby.py +++ b/sickgear/notifiers/emby.py @@ -127,15 +127,15 @@ class EmbyNotifier(Notifier): response = self._request(f'Library/{endpoint}/Updated', cur_host, keys[i], **args) # Emby will initiate a LibraryMonitor path refresh one minute after this success - if 200 <= self.response.get('status_code') < 300 and self.response.get('ok'): + if 200 <= (self.response.get('status_code') or 0) < 300 and self.response.get('ok'): self._log(f'Success: update {mode_to_log} sent to host {cur_host} in a library updated call') continue - elif 401 == self.response.get('status_code'): + elif 401 == self.response.get('status_code', 0): self._log_warning(f'Failed to authenticate with {cur_host}') - elif 404 == self.response.get('status_code'): + elif 404 == self.response.get('status_code', 0): args = dict(post_json={'Updates': [{'Path': '', 'UpdateType': ''}]}) self._request(f'Library/Media/Updated', cur_host, keys[i], **args) - if 200 <= self.response.get('status_code') < 300 and self.response.get('ok'): + if 200 <= (self.response.get('status_code') or 0) < 300 and self.response.get('ok'): self._log(f'Success: fallback to sending Library/Media/Updated call' f' to scan all shows at host {cur_host}') continue