configure client in utils method
This commit is contained in:
@@ -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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user