i'm a silly girl

This commit is contained in:
laura 2025-11-07 17:22:00 -03:00
parent e2466b202a
commit 78f540d4c3
Signed by: w
GPG key ID: BCD2117C99E69817
4 changed files with 34 additions and 9 deletions

View file

@ -10,7 +10,9 @@ interface Track {
name: string;
artist: string;
loved: boolean;
playing: boolean;
cover?: string;
url: string;
}
const secret = Deno.env.get("FM_SECRET");
@ -25,11 +27,13 @@ if (secret) {
extended: true,
});
return raw?.filter((x) => !x.nowPlaying).map((track) => ({
return raw?.map((track) => ({
artist: track.artist.name,
name: track.name,
loved: "loved" in track ? track.loved as boolean : false,
playing: track.nowPlaying || false,
cover: track.images.pop()?.url,
url: track.url || "#",
}));
}, 60);
}