feat(web/m7-353): admin cover-refetch UI (per-album + bulk)

Adds cover_art_source to AlbumRef, two admin API helpers (refetchAlbumCover,
refetchMissingCovers), a per-album retry button gated on is_admin in the album
detail page, and a bulk-refetch section in the admin overview.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 15:15:26 -04:00
parent d4a837b904
commit 28617df5bd
5 changed files with 133 additions and 1 deletions
+20
View File
@@ -161,3 +161,23 @@ export function createQuarantineActionsQuery(limit: number = 50) {
staleTime: 60_000
});
}
// Admin cover art ---------------------------------------------------------
export type RefetchAlbumCoverResponse = {
album_id: string;
cover_art_path: string | null;
cover_art_source: string | null;
};
export async function refetchAlbumCover(albumId: string): Promise<RefetchAlbumCoverResponse> {
return api.post<RefetchAlbumCoverResponse>(`/api/admin/albums/${albumId}/cover/refetch`, {});
}
export type RefetchMissingResponse = {
queued: number;
};
export async function refetchMissingCovers(): Promise<RefetchMissingResponse> {
return api.post<RefetchMissingResponse>('/api/admin/covers/refetch-missing', {});
}