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
This commit is contained in:
vicrodh committed 2026-01-28 02:59:26 -06:00
1 parent d559832ffe
commit 7327a3d060
2 files changed
+33 -4

No files matched your search

+7 -4
View File
@@ -257,7 +257,7 @@
<!-- Source Badge (Local Library only) -->
{#if sourceBadge}
<div class="source-badge" title={sourceBadge === 'user' ? 'Local file' : 'Qobuz offline'}>
<div class="source-badge" class:local-badge={sourceBadge === 'user'} title={sourceBadge === 'user' ? 'Local file' : 'Qobuz offline'}>
{#if sourceBadge === 'user'}
<HardDrive size={14} />
{: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 {
@@ -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);
}
}
/**