Fix genre browser returning empty when metadata source changes

The genre query filtered by active source (spotify/deezer/itunes)
but discovery pool entries keep their original source. Switching
metadata sources caused all genres to disappear. Removed the source
filter since artist genres are source-agnostic metadata.
pull/253/head
Broque Thomas 2 months ago
parent bb9564ee88
commit f3bb8d2f0f

@ -322,12 +322,13 @@ class PersonalizedPlaylistsService:
with self.database._get_connection() as conn:
cursor = conn.cursor()
# Get all tracks with genres from discovery pool, filtered by source
# Get all tracks with genres from discovery pool (source-agnostic —
# genres are artist metadata, not tied to a specific metadata source)
cursor.execute("""
SELECT artist_genres
FROM discovery_pool
WHERE artist_genres IS NOT NULL AND source = ?
""", (active_source,))
WHERE artist_genres IS NOT NULL
""")
rows = cursor.fetchall()
if not rows:

Loading…
Cancel
Save