From abb384f479b7e3d943718923ebba133af1e8ae60 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 8 May 2026 23:08:02 -0400 Subject: [PATCH] feat(web/admin): LidarrTestResult success branch carries profile + folder lists Mirrors the server-side extension of POST /api/admin/lidarr/test. The integrations page consumes these in the next commit to pre-fill the quality/metadata/root-folder dropdowns on first-time Lidarr setup. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/src/lib/api/types.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/web/src/lib/api/types.ts b/web/src/lib/api/types.ts index ac41e346..c58ded2f 100644 --- a/web/src/lib/api/types.ts +++ b/web/src/lib/api/types.ts @@ -192,9 +192,19 @@ export type LidarrRootFolder = { }; // testLidarrConnection always returns 200; callers branch on `.ok`. +// On success the response carries the live profile + folder lists so the +// integrations page can pre-fill its dropdowns on first-time setup +// without a separate round-trip. export type LidarrTestResult = - | { ok: true; version: string } - | { ok: false; error: string }; + | { + ok: true; + version: string; + quality_profiles?: { id: number; name: string }[]; + metadata_profiles?: { id: number; name: string }[]; + root_folders?: { path: string; accessible: boolean; free_space: number }[]; + list_errors?: Record; + } + | { ok: false; error: string }; // Lidarr quarantine ------------------------------------------------------