"use client"; import { useState } from "react"; /** Album art keyed by release-group MBID, served through /api/cover (which caches it on disk + * sends a long Cache-Control, so it isn't re-fetched from the Cover Art Archive on every * Library / Recently-Pressed render). Falls back to a placeholder when there's no MBID or art. */ export function CoverArt({ rgMbid, alt, size = 250, className, }: { rgMbid: string | null | undefined; alt: string; size?: 250 | 500; className?: string; }) { const [failed, setFailed] = useState(false); const cls = `cover ${className ?? ""}`.trim(); if (!rgMbid || failed) { return (