From 199abb294f98cd7d369650bb9455f69a603ef532 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 13 Jun 2025 21:50:13 -0400 Subject: [PATCH] Now playing --- src/lib/components/Album.svelte | 4 + src/lib/components/NowPlaying.svelte | 105 +++++++++++++++++++++++++ src/lib/server/apple-music-client.ts | 7 +- src/lib/types/lastfm.ts | 3 + src/routes/api/lastfm/+server.ts | 112 +++++++++++++++++++++++++-- 5 files changed, 220 insertions(+), 11 deletions(-) create mode 100644 src/lib/components/NowPlaying.svelte diff --git a/src/lib/components/Album.svelte b/src/lib/components/Album.svelte index 204d726..b4e1b4c 100644 --- a/src/lib/components/Album.svelte +++ b/src/lib/components/Album.svelte @@ -2,6 +2,7 @@ import { spring } from 'svelte/motion' import type { Album } from '$lib/types/lastfm' import { audioPreview } from '$lib/stores/audio-preview' + import NowPlaying from './NowPlaying.svelte' interface AlbumProps { album?: Album @@ -109,6 +110,9 @@ style="transform: scale({$scale})" loading="lazy" /> + {#if album.isNowPlaying} + + {/if} {#if hasPreview && isHovering}