Skip to content

Comments

Refresh display preferences on each playback session#1909

Open
skalthoff wants to merge 1 commit intojellyfin:masterfrom
skalthoff:fix/refresh-display-preferences-on-playback
Open

Refresh display preferences on each playback session#1909
skalthoff wants to merge 1 commit intojellyfin:masterfrom
skalthoff:fix/refresh-display-preferences-on-playback

Conversation

@skalthoff
Copy link

Changes

PlayerViewModel loads display preferences (skip forward/back length) once in init {} and caches them for the entire app session. When a user changes these settings in the WebView settings UI, the native player keeps using the stale cached values until a full app restart.

This refreshes display preferences from the server at the start of setupPlayer(), so each new playback session picks up any changes made in settings.

Files changed:

  • app/src/main/java/org/jellyfin/mobile/player/PlayerViewModel.kt — Added a viewModelScope.launch block at the top of setupPlayer() that re-fetches display preferences from the server API, using the same pattern as the existing init {} block

Code assistance

None.

Issues

Fixes #1908

DisplayPreferences (skipForwardLength, skipBackLength) are loaded
once in PlayerViewModel.init and cached for the app lifetime. When
a user changes skip duration in the WebView settings UI, the native
player continues using the stale cached values until a full app
restart.

Refresh display preferences from the server at the start of
setupPlayer() so each new playback session picks up any changes
made in the settings UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native player uses stale cached display preferences, never refreshes after WebView settings change

1 participant