fix(jellyseer): resolve request titles via /movie|tv endpoints

The requests table showed all names as "—" because Jellyseerr's /api/v1/request
list does NOT embed titles — they live on the Movie/Series records. Added
JellyseerrClient._resolve_title(media_type, tmdb_id) that fetches
/api/v1/movie/{tmdbId} (→ title) or /api/v1/tv/{tmdbId} (→ name), cached on
the client instance so subsequent polls are instant.

Also scoped the table fetch to open requests only (pending + approved) via
Jellyseerr's filter param, instead of fetching all 800+ historical requests.
open_requests() fetches pending+approved (paginated), resolves their titles
(small set → fast), and returns them sorted by date added desc.

Updated the frontend table's status filter to Open/Pending/Approved (the data
only contains open requests now).

Tests: title resolution end-to-end (movie tmdbId → title), caching across
polls, filter param used. 404/404 backend + 184/184 frontend + build green.
This commit is contained in:
Developer
2026-07-13 09:58:25 +00:00
parent 7665ef4d10
commit 45c295457a
7 changed files with 145 additions and 82 deletions
@@ -107,10 +107,8 @@ def fetch_jellyseer_requests(service: Any) -> list[dict[str, Any]]:
tab and widgets don't each open a new session.
"""
base_url = str(service.config.get("jellyseerr_url") or "")
api_key = str(
(service.secrets or {}).get("jellyseerr_api_key") or service.config.get("jellyseerr_api_key") or ""
)
api_key = str((service.secrets or {}).get("jellyseerr_api_key") or service.config.get("jellyseerr_api_key") or "")
if not base_url or not api_key:
return []
client = _jellyseer_client((service.id, base_url, api_key))
return client.requests(500)
return client.open_requests()