Skip to main content

Module profiles

Module profiles 

Source
Expand description

Profile commands: who can use this device, and how they get in.

The rule that shapes this whole module: switching is not logging out. auth_logout calls Jellyfin’s logout endpoint, which invalidates the token server-side — so a switch built on it would make every switch back cost a password, which is the problem this feature exists to solve. Nothing here calls it.

TRACES: UR-082, UR-083, UR-084 | DR-267, DR-268, DR-269, DR-270, DR-274

Constants§

ASK_ON_START_KEY 🔒
Settings key for “ask who’s watching on start”.

Functions§

active_user_id 🔒
adopt_session 🔒
Make the newly-active profile the session the rest of the backend acts as.
ask_on_start 🔒
current_server 🔒
The server this device is signed in to, as (server_id, server_url).
execute_switch 🔒
Run a switch plan.
profiles_add
Add another account from the current server to this device.
profiles_get_ask_on_start
Read the “ask who’s watching on start” setting.
profiles_list
List the accounts this device knows for the current server.
profiles_remove
Forget a profile on this device.
profiles_set_ask_on_start
Turn “ask who’s watching on start” on or off.
profiles_set_pin
Set, change, or clear a profile’s PIN.
profiles_startup_target
Whether startup should resume an account or ask who is watching.
profiles_unlock
Enter a profile, with its PIN if it has one.
profiles_unlock_with_password
Enter a profile with its Jellyfin password, for someone who has forgotten their PIN.
save_token 🔒
service 🔒
set_active_user 🔒