fix(server,web/m7-353): post-review fixes (test compilation, AlbumRef field, bulk handler, design system)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 15:21:24 -04:00
parent 28617df5bd
commit 4e3bd46d69
7 changed files with 17 additions and 19 deletions
+1 -8
View File
@@ -57,18 +57,11 @@ type adminBulkRefetchResp struct {
// the configured backfill cap.
func (h *handlers) handleAdminBulkRefetchCovers(w http.ResponseWriter, r *http.Request) {
cap := h.coverArtBackfillCap
q := dbq.New(h.pool)
rows, err := q.ListAlbumsRetryMissing(r.Context(), int32(cap))
if err != nil {
h.logger.Error("admin: bulk count failed", "err", err)
writeErr(w, http.StatusInternalServerError, "server_error", "count failed")
return
}
go func() {
bgCtx := context.Background()
if _, err := h.coverart.EnrichRetryMissing(bgCtx, cap); err != nil {
h.logger.Warn("admin: bulk cover refetch failed", "err", err)
}
}()
writeJSON(w, http.StatusOK, adminBulkRefetchResp{Queued: len(rows)})
writeJSON(w, http.StatusOK, adminBulkRefetchResp{Queued: cap})
}