diff --git a/src/components/MusicPlayer.astro b/src/components/MusicPlayer.astro index 15cdd7e..0dcf0f1 100644 --- a/src/components/MusicPlayer.astro +++ b/src/components/MusicPlayer.astro @@ -7,7 +7,6 @@ interface Props { const { lb } = Astro.props; const profileUrl = `https://listenbrainz.org/user/${lb.username}`; -const embedUrl = `https://listenbrainz.org/user/${lb.username}/embed/playing-now`; function timeAgo(ts?: number): string { if (!ts) return ""; @@ -17,137 +16,202 @@ function timeAgo(ts?: number): string { if (diff < 86400) return `${Math.floor(diff / 3600)}h ago`; return `${Math.floor(diff / 86400)}d ago`; } + +const isLive = !!lb.nowPlaying; +const hero = lb.nowPlaying ?? lb.recentTracks[0] ?? null; --- -