Fix enrichment coverage: correct Spotify column name and add all 9 services

This commit is contained in:
Broque Thomas 2026-03-22 15:36:25 -07:00
parent b59a0eaf95
commit f6225ec9a8
2 changed files with 10 additions and 2 deletions

View file

@ -3006,8 +3006,11 @@ class MusicDatabase:
# Enrichment coverage
enrichment = {}
for service, col in [('spotify', 'spotify_id'), ('musicbrainz', 'musicbrainz_id'),
('deezer', 'deezer_id'), ('lastfm', 'lastfm_url')]:
for service, col in [('spotify', 'spotify_artist_id'), ('musicbrainz', 'musicbrainz_id'),
('deezer', 'deezer_id'), ('lastfm', 'lastfm_url'),
('itunes', 'itunes_artist_id'), ('audiodb', 'audiodb_id'),
('genius', 'genius_id'), ('tidal', 'tidal_id'),
('qobuz', 'qobuz_id')]:
try:
cursor.execute(f"SELECT COUNT(*) FROM artists WHERE {col} IS NOT NULL AND {col} != ''")
matched = (cursor.fetchone() or [0])[0]

View file

@ -55118,6 +55118,11 @@ function _renderLibraryHealth(data) {
{ name: 'MusicBrainz', pct: ec.musicbrainz || 0, color: '#ba55d3' },
{ name: 'Deezer', pct: ec.deezer || 0, color: '#a238ff' },
{ name: 'Last.fm', pct: ec.lastfm || 0, color: '#d51007' },
{ name: 'iTunes', pct: ec.itunes || 0, color: '#fc3c44' },
{ name: 'AudioDB', pct: ec.audiodb || 0, color: '#1a9fff' },
{ name: 'Genius', pct: ec.genius || 0, color: '#ffff64' },
{ name: 'Tidal', pct: ec.tidal || 0, color: '#00ffff' },
{ name: 'Qobuz', pct: ec.qobuz || 0, color: '#4285f4' },
];
enrichEl.innerHTML = services.map(s => `
<div class="stats-enrich-item">