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:
@@ -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', {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user