Repository navigation
Per-viewer Jellyfin user selection and isolated session state - #231
Merged
Merged
Conversation
WatchBack followed the first playing Jellyfin session and kept the manual episode, prefetch state, sync trigger/gate and last-sync status in single global slots, so concurrent viewers overwrote each other. - List Jellyfin users (GET /api/watchstate/users) and prompt each browser to pick one when there are several; the choice is kept in localStorage. - The Jellyfin provider follows only the chosen user's session (cached per user); with no choice it keeps the old first-playing behaviour. - A viewer is the chosen user, else the browser's random client id (WatchViewer.Key). Manual watch state, prefetch state, sync trigger, sync gate and last-sync status are all scoped to the viewer, so browsers only affect each other when they are the same Jellyfin user. - Prefetch eviction spares cache entries another viewer is on or warmed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Summary
WatchBack followed the first playing Jellyfin session, and kept the manual episode, prefetch state, sync trigger/gate and last-sync status in single global slots. With several people using one instance they overwrote each other.
GET /api/watchstate/userslists Jellyfin users. When there are 2+, each browser is prompted to pick one (saved in localStorage aswb_watchUser; a header button switches). With 0–1 users nothing changes.WatchViewer.Key). Manual watch state, prefetch state, "sync now" trigger, sync gate and last-sync status are scoped to the viewer, so browsers only affect each other when they are the same Jellyfin user. Prefetch eviction also spares cache entries another viewer is on or has warmed./api/sync,/api/sync/stream,/api/sync/trigger,/api/watchstate/manualand/api/diagnostics/statusacceptuserId/clientIdquery params. TheISyncService.SyncAsyncsignature gainswatchUserIdandclientId.Type of change
Checklist
main(main has not moved)dotnet buildpasses with no new warningsdotnet testandnpm testpass (CI filter: 58 + 237 + 158 backend, 365 frontend)dotnet formaton the changed files only.resxfiles (en + es)Notes for reviewers
LiveIntegrationTestsfail locally because they target a hard-coded unreachable Jellyfin address; that is unrelated./Usersalso returns disabled/hidden accounts, so the picker may list service accounts. No filter yet.app.js/app.bundle.cssare rebuilt; theioniconschurn from the Vite build was reverted.🤖 Generated with Claude Code