Repository navigation
feat: add /users/persisted endpoint, independent of live Jellyfin - #72
Merged
Merged
Conversation
Found live 2026-07-16, the second time in one night: the admin panel's Users tab is completely unusable during a Jellyfin outage, even after fixing the underlying panics/500s (#62-#71) -- GetUsers/SearchUsers fundamentally need a live Jellyfin connection to list users, since Jellyfin IS the user database. There's no way to make that endpoint work without Jellyfin reachable. What CAN work: app.storage's own persistent badger DB already stores an EmailAddress record (Jellyfin ID, email, label, contact/admin flags) per user, independent of Jellyfin's own availability. This was previously only accessible via internal code paths (housekeeping cleanup, migrations) with no API route exposing it -- recovering it during tonight's incident required a one-off standalone Go program reading the badger DB file directly. Adds GET /users/persisted, returning every stored EmailAddress record. Trades completeness (no online status, no Jellyfin username, no last-active -- just enough to know who to email) for actually working when Jellyfin is down. Same auth group (webAuth) as every other /users route.
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
The second time in one night: the admin panel's Users tab is unusable during a Jellyfin outage, even after fixing the underlying panics and 500s (#62-#71).
GetUsers/SearchUsersfundamentally need a live Jellyfin connection to list users, since Jellyfin is the user database — there's no way to make those endpoints work without Jellyfin reachable, no matter how the errors are handled.What can work:
app.storage's own persistent badger DB already stores anEmailAddressrecord (Jellyfin ID, email, label, contact/admin flags) per user, independent of Jellyfin's own availability — it's written once and just sits there. This was previously only used internally (housekeeping cleanup, migrations), with no API route exposing it. Recovering it during tonight's incident required a one-off standalone Go program reading the badger DB file directly, which isn't something to repeat every time.Change
GET /users/persisted: returns every storedEmailAddressrecord (Jellyfin ID, email, label, contact/admin flags)webAuth()auth group as every other/usersroute, no new permissions surfaceTest plan
GET /users/persistedreturns the stored email list/users//users/count/etc. routes