feat: propagate custom album covers across all views

Resolve custom album covers in AlbumCard (covers 30+ usages
automatically), NowPlayingBar, and ImmersivePlayer.
This commit is contained in:
vicrodh committed 2026-02-24 10:11:01 -06:00
1 parent 5f1d5a24ce
commit 114b120fd4
2 files changed
+5 -4

No files matched your search

+2 -1
View File
@@ -9,6 +9,7 @@
loadAlbumFavorites,
toggleAlbumFavorite
} from '$lib/stores/albumFavoritesStore';
import { resolveAlbumCover } from '$lib/stores/customAlbumCoverStore';
interface Props {
albumId?: string;
@@ -219,7 +220,7 @@
<!-- Image overlays placeholder when loaded -->
{#if !imageError && artwork}
<img class="artwork-image" src={artwork} alt={title} loading="lazy" decoding="async" onerror={handleImageError} />
<img class="artwork-image" src={albumId ? resolveAlbumCover(albumId, artwork) : artwork} alt={title} loading="lazy" decoding="async" onerror={handleImageError} />
{/if}
<!-- Action Overlay -->
+3 -3
View File
@@ -51,7 +51,7 @@
} from '$lib/stores/playbackPreferencesStore';
import { initBlacklistStore, isBlacklisted as isArtistBlacklisted } from '$lib/stores/artistBlacklistStore';
import { initCustomArtistImageStore, clearCustomArtistImages } from '$lib/stores/customArtistImageStore';
import { initCustomAlbumCoverStore, clearCustomAlbumCovers } from '$lib/stores/customAlbumCoverStore';
import { initCustomAlbumCoverStore, clearCustomAlbumCovers, resolveAlbumCover } from '$lib/stores/customAlbumCoverStore';
// UI state management
import {
@@ -4218,7 +4218,7 @@
<!-- Now Playing Bar -->
{#if currentTrack}
<NowPlayingBar
artwork={currentTrack.artwork}
artwork={currentTrack.albumId ? resolveAlbumCover(currentTrack.albumId, currentTrack.artwork) : currentTrack.artwork}
trackTitle={currentTrack.title}
artist={currentTrack.artist}
album={currentTrack.album}
@@ -4298,7 +4298,7 @@
if (isFullScreenOpen) closeFullScreen();
if (isFocusModeOpen) closeFocusMode();
}}
artwork={currentTrack.artwork}
artwork={currentTrack.albumId ? resolveAlbumCover(currentTrack.albumId, currentTrack.artwork) : currentTrack.artwork}
trackTitle={currentTrack.title}
artist={currentTrack.artist}
album={currentTrack.album}