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) <noreply@anthropic.com>
This commit is contained in:
2026-05-08 23:08:02 -04:00
parent 22f03a5fe8
commit abb384f479
+12 -2
View File
@@ -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<string, string>;
}
| { ok: false; error: string };
// Lidarr quarantine ------------------------------------------------------