eebc86a52b
Add a shared ServiceBaseUrl type (BeforeValidator + Field description) in integrations/base.py and apply it to base_url across all six service configs (grafana, prometheus, alertmanager, jellyfin, jellyseerr, nextcloud). Missing http:// or https:// schema now fails fast with a clear 422 instead of breaking HTTP clients silently. Tests cover reject/accept cases; REQUIREMENTS updated.
34 lines
858 B
Python
34 lines
858 B
Python
"""Jellyseerr service definition.
|
|
|
|
Jellyseerr is a companion to Jellyfin (request management). It is modeled as its
|
|
own service type so multiple Jellyseerr instances are supported independently of
|
|
Jellyfin. It provides no dashboard widgets today.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from media_library_viewer_api.integrations.base import (
|
|
SecretField,
|
|
ServiceBaseUrl,
|
|
ServiceConfigBase,
|
|
ServiceDefinition,
|
|
)
|
|
|
|
|
|
class JellyseerrConfig(ServiceConfigBase):
|
|
"""Non-secret Jellyseerr connection config."""
|
|
|
|
base_url: ServiceBaseUrl
|
|
|
|
|
|
DEFINITION = ServiceDefinition(
|
|
service_type="jellyseerr",
|
|
name="Jellyseerr",
|
|
description="Request management companion to Jellyfin.",
|
|
config_model=JellyseerrConfig,
|
|
secret_fields=[
|
|
SecretField(key="api_key", label="API key", required=True),
|
|
],
|
|
widget_kinds=[],
|
|
)
|