fix scrobblerrr FOR REAL

This commit is contained in:
Reid 2026-02-17 07:23:29 -08:00
parent 8a6d08d276
commit 41af765c7b
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD

View file

@ -21,7 +21,7 @@
"@attr"?: { nowplaying: boolean },
album: LastFmResource<string>,
artist: LastFmResource<string>,
date?: LastFmResource<string>,
date?: LastFmResource<string> & { uts: number },
image: LastFmResource<string>[],
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..";