Refresh display preferences on each playback session#1909
Open
skalthoff wants to merge 1 commit intojellyfin:masterfrom
Open
Refresh display preferences on each playback session#1909skalthoff wants to merge 1 commit intojellyfin:masterfrom
skalthoff wants to merge 1 commit intojellyfin:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
PlayerViewModelloads display preferences (skip forward/back length) once ininit {}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 aviewModelScope.launchblock at the top ofsetupPlayer()that re-fetches display preferences from the server API, using the same pattern as the existinginit {}blockCode assistance
None.
Issues
Fixes #1908