From 41af765c7bfaf1202809fc3b66e8ed981bf62d02 Mon Sep 17 00:00:00 2001 From: reidlab Date: Tue, 17 Feb 2026 07:23:29 -0800 Subject: [PATCH] fix scrobblerrr FOR REAL --- src/components/LastFm.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/LastFm.astro b/src/components/LastFm.astro index 4e32916..39fd8f8 100644 --- a/src/components/LastFm.astro +++ b/src/components/LastFm.astro @@ -21,7 +21,7 @@ "@attr"?: { nowplaying: boolean }, album: LastFmResource, artist: LastFmResource, - date?: LastFmResource, + date?: LastFmResource & { uts: number }, image: LastFmResource[], name: string, url: string, @@ -39,7 +39,7 @@ title.href = track.url; album.innerText = track.album["#text"]; artist.innerText = track.artist["#text"]; - time.innerText = (track.date && new Date(track.date["#text"]).toLocaleString(undefined, { + time.innerText = (track.date && new Date(track.date.uts * 1000).toLocaleString(undefined, { dateStyle: "medium", timeStyle: "short" })) || (track["@attr"]?.nowplaying && "NOW!!!") || "epic error getting play time..";