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:
committed by
Luis Garcia
parent
679d3535b1
commit
b1639eab0f
@@ -1,5 +1,5 @@
|
||||
from src.jellyfin_emby import JellyfinEmby
|
||||
|
||||
from packaging import version
|
||||
|
||||
class Jellyfin(JellyfinEmby):
|
||||
def __init__(self, baseurl, token):
|
||||
@@ -8,7 +8,7 @@ class Jellyfin(JellyfinEmby):
|
||||
'Client="JellyPlex-Watched", '
|
||||
'Device="script", '
|
||||
'DeviceId="script", '
|
||||
'Version="5.2.0", '
|
||||
'Version="6.0.2", '
|
||||
f'Token="{token}"'
|
||||
)
|
||||
headers = {
|
||||
@@ -19,3 +19,6 @@ class Jellyfin(JellyfinEmby):
|
||||
super().__init__(
|
||||
server_type="Jellyfin", baseurl=baseurl, token=token, headers=headers
|
||||
)
|
||||
|
||||
def is_partial_update_supported(self, server_version):
|
||||
return server_version >= version.parse("10.9.0")
|
||||
|
||||
Reference in New Issue
Block a user