From 7327a3d060b49844fd3034ca5f6027b30f49288e Mon Sep 17 00:00:00 2001
From: vicrodh <103399283+vicrodh@users.noreply.github.com>
Date: Wed, 28 Jan 2026 02:59:26 -0600
Subject: [PATCH] fix(library): improve Qobuz badge display and add artist
debug logging
- Remove background/border from Qobuz badge, show icon at full 24px
- Keep background only for local badge (HardDrive icon)
- Add console logging when selecting artist to debug mismatch:
- Shows selected artist name (original and normalized)
- Shows which albums match
- Shows artist data from the artists array
---
src/lib/components/AlbumCard.svelte | 11 +++++---
.../components/views/LocalLibraryView.svelte | 26 +++++++++++++++++++
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/src/lib/components/AlbumCard.svelte b/src/lib/components/AlbumCard.svelte
index dec72e0a9..2560dbb7c 100644
--- a/src/lib/components/AlbumCard.svelte
+++ b/src/lib/components/AlbumCard.svelte
@@ -257,7 +257,7 @@
{#if sourceBadge}
-
+
{#if sourceBadge === 'user'}
{:else}
@@ -359,15 +359,18 @@
justify-content: center;
width: 24px;
height: 24px;
+ color: var(--text-secondary);
+ }
+
+ .source-badge.local-badge {
background: rgba(0, 0, 0, 0.7);
border-radius: 4px;
- color: var(--text-secondary);
backdrop-filter: blur(4px);
}
.source-badge .qobuz-badge-icon {
- width: 16px;
- height: 16px;
+ width: 24px;
+ height: 24px;
}
.play-overlay {
diff --git a/src/lib/components/views/LocalLibraryView.svelte b/src/lib/components/views/LocalLibraryView.svelte
index ba04ee277..a35efa7f9 100644
--- a/src/lib/components/views/LocalLibraryView.svelte
+++ b/src/lib/components/views/LocalLibraryView.svelte
@@ -2020,6 +2020,32 @@
if (normalizeArtistName(name) === 'various artists') return;
// Select artist to show their albums in the right column
selectedArtistName = name;
+
+ // Debug: Log artist selection and matching albums
+ const normalizedSelected = normalizeArtistName(name);
+ console.log('[Artist Debug] Selected artist:', name);
+ console.log('[Artist Debug] Normalized name:', normalizedSelected);
+
+ // Find albums that should match
+ const matchingAlbums = albums.filter(album => {
+ const normalizedArtist = normalizeArtistName(album.artist);
+ const exactMatch = normalizedArtist === normalizedSelected;
+ const partialMatch = normalizedArtist.includes(normalizedSelected);
+ if (exactMatch || partialMatch) {
+ console.log('[Artist Debug] Match found:', album.title, '- Artist:', album.artist);
+ }
+ return exactMatch || partialMatch;
+ });
+
+ console.log('[Artist Debug] Total matching albums:', matchingAlbums.length);
+ console.log('[Artist Debug] Total albums in library:', albums.length);
+
+ // Also check artist data
+ const artistData = artists.find(a => a.name === name);
+ if (artistData) {
+ console.log('[Artist Debug] Artist from artists array:', artistData);
+ console.log('[Artist Debug] Claimed album count:', artistData.album_count, 'track count:', artistData.track_count);
+ }
}
/**