diff --git a/app/page.tsx b/app/page.tsx index daa7162..2df63fe 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,7 +4,7 @@ import Header from '@/components/Header' import Footer from '@/components/Footer' import Button from '@/components/objects/Button' import Link from '@/components/objects/Link' -import LastPlayed from '@/components/widgets/LastPlayed' +import LastPlayed from '@/components/widgets/NowPlaying' import Image from 'next/image' import { CreditCard, Mail, PillBottle, Scale } from 'lucide-react' import { FaHandcuffs } from "react-icons/fa6" diff --git a/components/widgets/LastPlayed.tsx b/components/widgets/NowPlaying.tsx similarity index 87% rename from components/widgets/LastPlayed.tsx rename to components/widgets/NowPlaying.tsx index 48dccaa..a9c98c9 100644 --- a/components/widgets/LastPlayed.tsx +++ b/components/widgets/NowPlaying.tsx @@ -4,9 +4,11 @@ import type React from "react" import { useEffect, useState, useCallback, useRef } from "react" import Image from "next/image" import { Music, ExternalLink, Disc, User, Loader2, AlertCircle } from "lucide-react" +import { TbDiscOff, TbDisc } from "react-icons/tb" import Marquee from "react-fast-marquee" import { Progress } from "@/components/ui/progress" import Link from "@/components/objects/Link" + interface Track { track_name: string artist_name: string @@ -83,7 +85,7 @@ const NowPlaying: React.FC = () => { const mbid = data.releases[0].id updateProgress(3, 3, "Fetching cover art...") setTrack(prev => prev ? { ...prev, mbid: `${mbid || null}` } : { track_name: "", artist_name: "", release_name: undefined, mbid: `${mbid || null}` }) - const coverArtResponse = await fetch(`https://coverartarchive.org/release/${mbid}/front-250`) + const coverArtResponse = await fetch(`https://coverartarchive.org/release/${mbid}/front`) if (coverArtResponse.ok) { setCoverArt(coverArtResponse.url) setLoading(false) @@ -143,10 +145,12 @@ const NowPlaying: React.FC = () => { console.log("[LastPlayed] Loading state rendered") return (
-

Now Playing

+
+ +

Fetching music data...

+
0 ? (progress * 100) / steps : 0} className="mb-4" />
-

{loadingStatus} {steps > 0 && `(${progress}/${steps})`}

@@ -172,7 +176,10 @@ const NowPlaying: React.FC = () => { console.log("[LastPlayed] Hidden due to no track data") return (
-

Nothing's playing right now

+
+ +

Nothing's playing right now

+

Can you believe it? I'm not listening to anything on ListenBrainz right now! If you're in the mood, feel free to check out my ListenBrainz.

@@ -183,7 +190,10 @@ const NowPlaying: React.FC = () => { console.log("[LastPlayed] Rendered track:", track.track_name) return (
-

Now Playing

+
+ +

Now Playing

+
{coverArt ? (
@@ -227,6 +237,17 @@ const NowPlaying: React.FC = () => {
+
+
+
+

+ LIVE data provided by ListenBrainz +

+
+

+ Last updated: {new Date().toLocaleString()} +

+
) }