Merge branch 'main' into dev

This commit is contained in:
JackDandy 2023-12-10 05:14:16 +00:00
commit c30015b136
3 changed files with 11 additions and 5 deletions

View file

@ -23,6 +23,12 @@
* Fix media process being ignored by Plex extras * Fix media process being ignored by Plex extras
### 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) ### 3.30.4 (2023-10-12 11:50:00 UTC)
* Add metadata source attribution in footer * Add metadata source attribution in footer

View file

@ -38,7 +38,7 @@ warnings.filterwarnings('ignore', message='.*deprecated in cryptography.*')
versions = [((3, 8, 2), (3, 8, 18)), versions = [((3, 8, 2), (3, 8, 18)),
((3, 9, 0), (3, 9, 2)), ((3, 9, 4), (3, 9, 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)): 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] major, minor, micro = sys.version_info[:3]
print('Python %s.%s.%s detected.' % (major, minor, micro)) print('Python %s.%s.%s detected.' % (major, minor, micro))

View file

@ -127,15 +127,15 @@ class EmbyNotifier(Notifier):
response = self._request(f'Library/{endpoint}/Updated', cur_host, keys[i], **args) response = self._request(f'Library/{endpoint}/Updated', cur_host, keys[i], **args)
# Emby will initiate a LibraryMonitor path refresh one minute after this success # 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') self._log(f'Success: update {mode_to_log} sent to host {cur_host} in a library updated call')
continue 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}') 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': ''}]}) args = dict(post_json={'Updates': [{'Path': '', 'UpdateType': ''}]})
self._request(f'Library/Media/Updated', cur_host, keys[i], **args) 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' self._log(f'Success: fallback to sending Library/Media/Updated call'
f' to scan all shows at host {cur_host}') f' to scan all shows at host {cur_host}')
continue continue