Methods

(static) DeleteFromServerList(idOrUrl) → {void}

Parameters:
NameTypeDescription
idOrUrlstring
Returns:
Type: 
void

(static) GetConfigTree() → {dynamic}

Read config tree from json config file and return

Returns:
Type: 
dynamic

(static) RegistryReadAll(section) → {dynamic}

Return all data found inside a registry section

Parameters:
NameTypeDescription
sectionstring
Returns:
Type: 
dynamic

(static) SaveServerList() → {void}

Saved-server list persistence. Pure registry operations on the saved_servers key — config.bs's domain, alongside getSavedUsers — called from both SetServerScreen (render thread, delete) and the loginRouter coordinator (main thread, save).

Returns:
Type: 
void

(static) findConfigTreeKey(key, tree) → {dynamic}

Recursivly search the config tree for entry with settingname equal to key

Parameters:
NameTypeDescription
keystring
treedynamic
Returns:
Type: 
dynamic

(static) findServerInList(savedJson, guid) → {object}

Pure: match the saved_servers JSON against a server GUID, case-insensitively (via serverIdsMatch). Split out from the registry read (findSavedServerByGuid in replayRoute.bs) so the match logic is unit-testable without touching the registry (getSetting reads the real "JellyRock" section, which tests must not write). Lives here alongside the saved_servers shape.

Parameters:
NameTypeDescription
savedJsondynamic
guidstring
Returns:
Type: 
object

(static) getGlobalRegistrySection() → {string}

Helper to get the global registry section name Returns "test-global" during tests, "JellyRock" in production

Returns:
Type: 
string

(static) getRegistrySections() → {object}

Return an array of all the registry section keys

Returns:
Type: 
object

(static) getSavedUsers() → {object}

Returns an array of saved users from the registry that belong to the active server

Returns:
Type: 
object

(static) getSetting(key, defaultValueopt) → {dynamic}

"JellyRock" registry accessors for the default global settings

Parameters:
NameTypeAttributesDefaultDescription
keydynamic
defaultValuedynamic<optional>
invalid
Returns:
Type: 
dynamic

(static) getSettingKeysToDelete(allKeys, preserveKeys) → {object}

Filter registry keys to find those that should be deleted during a settings reset Preserves session/identity keys, deletes everything else

Parameters:
NameTypeDescription
allKeysobject

associative array of all registry key-value pairs

preserveKeysobject

array of key names to preserve

Returns:
  • array of key names that should be deleted
Type: 
object

(static) getUserSetting(key) → {dynamic}

User registry accessors for the currently active user

Parameters:
NameTypeDescription
keystring
Returns:
Type: 
dynamic

(static) isGlobalSetting(key) → {boolean}

Helper to determine if a setting is global (applies to all users)

Parameters:
NameTypeDescription
keystring
Returns:
Type: 
boolean

(static) registryDelete(key, sectionopt) → {void}

Parameters:
NameTypeAttributesDefaultDescription
keydynamic
sectiondynamic<optional>
invalid
Returns:
Type: 
void

(static) registryRead(key, sectionopt) → {dynamic}

Generic registry accessors

Parameters:
NameTypeAttributesDefaultDescription
keydynamic
sectiondynamic<optional>
invalid
Returns:
Type: 
dynamic

(static) registryWrite(key, value, sectionopt) → {void}

Parameters:
NameTypeAttributesDefaultDescription
keydynamic
valuedynamic
sectiondynamic<optional>
invalid
Returns:
Type: 
void

(static) serverIdsMatch(a, b) → {boolean}

True when two Jellyfin server ids refer to the same server. Jellyfin GUIDs are canonical lower-case hex, but fold both sides so a mis-cased id (e.g. from an external deep-link/cast sender) still matches. The single source of truth for "same server?" across the saved-server list and the saved-user filter — keeps every id comparison consistent.

Parameters:
NameTypeDescription
adynamic
bdynamic
Returns:
Type: 
boolean

(static) setSetting(key, value) → {void}

Parameters:
NameTypeDescription
keydynamic
valuedynamic
Returns:
Type: 
void

(static) setUserSetting(key, value) → {void}

Parameters:
NameTypeDescription
keystring
valuedynamic
Returns:
Type: 
void

(static) unsetSetting(key) → {void}

Parameters:
NameTypeDescription
keydynamic
Returns:
Type: 
void

(static) unsetUserSetting(key) → {void}

Parameters:
NameTypeDescription
keystring
Returns:
Type: 
void

(static) valueToString(value) → {string}

Convert dynamic value to string for registry storage

Parameters:
NameTypeDescription
valuedynamic
Returns:
Type: 
string