configure client in utils method

This commit is contained in:
2025-12-10 11:50:47 +01:00
parent a5659d90e8
commit 32e4a76cd1
4 changed files with 24 additions and 7 deletions

View File

@@ -1,7 +1,19 @@
from jellyfin_apiclient_python import JellyfinClient
from getmac import get_mac_address
from settings import settings
import os
class JellyfinUtils:
@staticmethod
def configure_client(client: JellyfinClient):
client.config.app(
settings.app_name,
settings.app_version,
JellyfinUtils.get_machine_name(),
JellyfinUtils.get_unique_id()
)
client.config.data['auth.ssl'] = settings.jellyfin_server_url.startswith('https://')
@staticmethod
def get_machine_name() -> str:
"""