Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.jellyfin.client_wrapper Namespace Reference

Classes

class  CannotConnect
 
class  InvalidAuth
 

Functions

tuple[str, dict[str, Any]] _connect (JellyfinClient client, str url, str username, str password)
 
dict[str, Any] _connect_to_address (ConnectionManager connection_manager, str url)
 
str _get_user_id (API api)
 
None _login (ConnectionManager connection_manager, str url, str username, str password)
 
JellyfinClient create_client (str device_id, str|None device_name=None)
 
str|None get_artwork_url (JellyfinClient client, dict[str, Any] item, int max_width=600)
 
tuple[str, dict[str, Any]] validate_input (HomeAssistant hass, dict[str, Any] user_input, JellyfinClient client)
 

Detailed Description

Utility methods for initializing a Jellyfin client.

Function Documentation

◆ _connect()

tuple[str, dict[str, Any]] homeassistant.components.jellyfin.client_wrapper._connect ( JellyfinClient  client,
str  url,
str  username,
str   password 
)
private
Connect to the Jellyfin server and assert that the user can login.

Definition at line 51 of file client_wrapper.py.

◆ _connect_to_address()

dict[str, Any] homeassistant.components.jellyfin.client_wrapper._connect_to_address ( ConnectionManager  connection_manager,
str   url 
)
private
Connect to the Jellyfin server.

Definition at line 64 of file client_wrapper.py.

◆ _get_user_id()

str homeassistant.components.jellyfin.client_wrapper._get_user_id ( API  api)
private
Set the unique userid from a Jellyfin server.

Definition at line 89 of file client_wrapper.py.

◆ _login()

None homeassistant.components.jellyfin.client_wrapper._login ( ConnectionManager  connection_manager,
str  url,
str  username,
str  password 
)
private
Assert that the user can log in to the Jellyfin server.

Definition at line 76 of file client_wrapper.py.

◆ create_client()

JellyfinClient homeassistant.components.jellyfin.client_wrapper.create_client ( str  device_id,
str | None   device_name = None 
)
Create a new Jellyfin client.

Definition at line 37 of file client_wrapper.py.

◆ get_artwork_url()

str | None homeassistant.components.jellyfin.client_wrapper.get_artwork_url ( JellyfinClient  client,
dict[str, Any]  item,
int   max_width = 600 
)
Find a suitable thumbnail for an item.

Definition at line 96 of file client_wrapper.py.

◆ validate_input()

tuple[str, dict[str, Any]] homeassistant.components.jellyfin.client_wrapper.validate_input ( HomeAssistant  hass,
dict[str, Any]  user_input,
JellyfinClient   client 
)
Validate that the provided url and credentials can be used to connect.

Definition at line 22 of file client_wrapper.py.