feat(services): resolve Jellyfin/Jellyseerr from the service registry (backend)
Slice 4b backend half. Jellyfin and Jellyseerr clients are now resolved from service instances instead of machine-level app config. - Add jellyseerr service definition (6 service types total); add user_id to the Jellyfin service config. - dependencies.py: jellyfin_service_id query param + _service_record (decrypt-on-read); get_jellyfin_client / get_jellyseerr_client / get_user_id resolve against the service registry (first enabled instance as fallback). - SSH/Files transport (get_ssh_client) unchanged; still uses machine_id. - Update service-registry tests for 6 types. Selection model: split params — ?jellyfin_service_id= for Jellyfin/Jellyseerr, ?machine_id= for SSH/Files. Frontend threading follows in the next PR. Verification: backend ruff clean, pytest 222 passed; frontend green (unchanged).
This commit is contained in:
@@ -9,6 +9,7 @@ from __future__ import annotations
|
||||
from media_library_viewer_api.integrations.base import ServiceDefinition, WidgetKind
|
||||
from media_library_viewer_api.integrations.grafana import DEFINITION as GRAFANA
|
||||
from media_library_viewer_api.integrations.jellyfin import DEFINITION as JELLYFIN
|
||||
from media_library_viewer_api.integrations.jellyseerr import DEFINITION as JELLYSEERR
|
||||
from media_library_viewer_api.integrations.nextcloud import DEFINITION as NEXTCLOUD
|
||||
from media_library_viewer_api.integrations.prometheus import DEFINITION as PROMETHEUS
|
||||
from media_library_viewer_api.integrations.ssh_tasks import DEFINITION as SSH_TASKS
|
||||
@@ -17,6 +18,7 @@ SERVICE_DEFINITIONS: dict[str, ServiceDefinition] = {
|
||||
GRAFANA.service_type: GRAFANA,
|
||||
PROMETHEUS.service_type: PROMETHEUS,
|
||||
JELLYFIN.service_type: JELLYFIN,
|
||||
JELLYSEERR.service_type: JELLYSEERR,
|
||||
NEXTCLOUD.service_type: NEXTCLOUD,
|
||||
SSH_TASKS.service_type: SSH_TASKS,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user