fix(jellyfin): fixes in jellyfin integration
This commit is contained in:
@@ -18,6 +18,34 @@ Current implemented calls:
|
||||
- `POST /api/integrations/jellyfin/sync`
|
||||
- `GET /api/integrations/jellyfin/sync-state`
|
||||
- `POST /api/integrations/jellyfin/events`
|
||||
- `GET /api/integrations/jellyfin/users/{jellyfin_user_id}/recommendations`
|
||||
- `POST /api/integrations/jellyfin/users/{jellyfin_user_id}/ratings/items/{jellyfin_item_id}`
|
||||
- `POST /api/integrations/jellyfin/users/{jellyfin_user_id}/library/items/{jellyfin_item_id}/viewed`
|
||||
- `GET /api/integrations/jellyfin/users/{jellyfin_user_id}/preferences`
|
||||
- `POST /api/integrations/jellyfin/users/{jellyfin_user_id}/recommendation-onboarding`
|
||||
|
||||
Configure the backend with:
|
||||
|
||||
- `JELLYFIN_INTEGRATION_ENABLED=true`
|
||||
- `JELLYFIN_PLUGIN_TOKEN=<same token configured in the plugin>`
|
||||
- `JELLYFIN_WEB_URL=<browser URL of Jellyfin, used for recommendation watch links>`
|
||||
|
||||
`JELLYFIN_SYNC_ENABLED=true` is still accepted as a legacy alias for `JELLYFIN_INTEGRATION_ENABLED=true`.
|
||||
|
||||
Optional backend-pull sync values:
|
||||
|
||||
- `JELLYFIN_BASE_URL=<backend-reachable Jellyfin server URL>`
|
||||
- `JELLYFIN_API_KEY=<Jellyfin API key>`
|
||||
|
||||
The Jellyfin API key is only for backend-to-Jellyfin calls. The plugin token is a MovieNight shared secret for plugin-to-backend calls.
|
||||
|
||||
Configure the plugin with:
|
||||
|
||||
- Backend URL: MovieNight backend URL reachable from the Jellyfin server, for example `http://movienight-backend:8080`
|
||||
- Plugin token: the exact `JELLYFIN_PLUGIN_TOKEN` value
|
||||
- Enable MovieNight integration: checked
|
||||
- Enable periodic backend sync: checked if the plugin should push library state on an interval
|
||||
- Send playback stop events: checked if completed playback should mark films viewed in MovieNight
|
||||
|
||||
Event requests use JSON with:
|
||||
|
||||
@@ -31,4 +59,6 @@ Event requests use JSON with:
|
||||
|
||||
The plugin sends `X-MovieNight-Plugin-Token` when configured. Completed Jellyfin playback stop events are sent as `playback.stopped`. Transient event push failures are retried three times with the same `event_id`.
|
||||
|
||||
The config page test action posts a small synthetic event to `/api/integrations/jellyfin/events` and treats `200` as success and `401` as token/config failure.
|
||||
Sync requests push Jellyfin users, items, and per-user watched states to the backend. The backend creates MovieNight users for new Jellyfin users using their Jellyfin id as the stable mapping key, upserts films by `jellyfinItemId`, and uses the Jellyfin-facing endpoints above for UI actions so Jellyfin ids do not have to match MovieNight UUIDs. Run "Sync Library" once after installing/configuring the plugin so recommendations, rating, and viewed actions can resolve Jellyfin items.
|
||||
|
||||
The config page test action posts a small `plugin.test` event to `/api/integrations/jellyfin/events` and treats `200` as success and `401` as token/config failure.
|
||||
|
||||
Reference in New Issue
Block a user