Jellyfin/Emby: Check partial sync support

- add `is_partial_update_supported` method to each class to validate given version against earliest known supported version
- add `get_server_version` to get server version number
- add `update_partial` parameter to user update function, deciding whether or not to allow partial updates
This commit is contained in:
awakenedhaggis
2024-07-15 11:12:29 -06:00
committed by Luis Garcia
parent 679d3535b1
commit b1639eab0f
3 changed files with 89 additions and 67 deletions

View File

@@ -1,4 +1,5 @@
from src.jellyfin_emby import JellyfinEmby
from packaging import version
class Emby(JellyfinEmby):
@@ -8,7 +9,7 @@ class Emby(JellyfinEmby):
'Client="JellyPlex-Watched", '
'Device="script", '
'DeviceId="script", '
'Version="0.0.0"'
'Version="6.0.2"'
)
headers = {
"Accept": "application/json",
@@ -19,3 +20,6 @@ class Emby(JellyfinEmby):
super().__init__(
server_type="Emby", baseurl=baseurl, token=token, headers=headers
)
def is_partial_update_supported(self, server_version):
return server_version > version.parse("4.4")