Personal Site
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

catch errors in getCurrentlyPlayingTrack bc it sometimes errors still

+1 -1
+1 -1
src/components/home/playing/NowPlaying.astro
··· 12 12 import smallBoxMask from "/assets/small-box-mask.png"; 13 13 import type { PlaybackState, Track } from "@spotify/web-api-ts-sdk"; 14 14 15 - const track = await sdk.player.getCurrentlyPlayingTrack(); 15 + const track = await sdk.player.getCurrentlyPlayingTrack().catch(() => null); 16 16 17 17 const isSong = ( 18 18 item: PlaybackState | null,