feat(services): select Jellyfin via jellyfin_service_id on the frontend
Slice 4b frontend half. Jellyfin-touching pages now select a Jellyfin service instance instead of a machine. - api/client.ts: Jellyfin-backed calls (counts/libraries/activity/users, media status/build/stop/force-stop, queryMedia) send jellyfin_service_id. - hooks/useDashboard, useUsers, useMedia: selector param renamed to jellyfinServiceId. - pages/Media + Applications: list jellyfin service instances and persist jellyfin_service_id in the URL. - Dashboard (widgets) and Users (default instance) need no selector change. - Update Applications + Media tests for the new hook/param. Files/SSH transport keeps machine_id. Verification: frontend lint 0 errors, build success, 70 tests; backend ruff clean, 222 tests.
This commit is contained in:
@@ -88,6 +88,26 @@ both.
|
||||
- Remove machine app fields from `settings_store.py` + `routers/settings.py`
|
||||
once the UI no longer writes them.
|
||||
|
||||
### Frontend half (this PR)
|
||||
|
||||
- [x] `api/client.ts`: Jellyfin-backed calls (`fetchCounts`, `fetchLibraries`,
|
||||
`fetchActivity`, `fetchUsers`, Media status/build/stop/force-stop, and
|
||||
`queryMedia`) now send `jellyfin_service_id` instead of `machine_id`.
|
||||
- [x] `hooks/useDashboard.ts`, `hooks/useUsers.ts`, `hooks/useMedia.ts`: renamed
|
||||
the selector param to `jellyfinServiceId`.
|
||||
- [x] `pages/Media.tsx` + `pages/Applications.tsx`: select a `jellyfin` service
|
||||
instance via `useServiceInstances("jellyfin")` and persist
|
||||
`jellyfin_service_id` in the URL.
|
||||
- [x] Dashboard (widget-based) and Users (default-instance) need no selector
|
||||
change.
|
||||
- [x] Updated Applications + Media tests for the new hook/param.
|
||||
|
||||
### Deferred (explicit follow-up)
|
||||
|
||||
- Remove machine-level Jellyfin/Jellyseerr fields from `settings_store.py`,
|
||||
`routers/settings.py`, and the Settings UI. Low urgency now that the runtime
|
||||
reads from services; the machine fields are simply unused for Jellyfin.
|
||||
|
||||
### Verification (backend half)
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user