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.
This commit is contained in:
Broque Thomas 2026-03-24 14:50:37 -07:00
parent bb9564ee88
commit f3bb8d2f0f

View file

@ -322,12 +322,13 @@ class PersonalizedPlaylistsService:
with self.database._get_connection() as conn: with self.database._get_connection() as conn:
cursor = conn.cursor() 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(""" cursor.execute("""
SELECT artist_genres SELECT artist_genres
FROM discovery_pool FROM discovery_pool
WHERE artist_genres IS NOT NULL AND source = ? WHERE artist_genres IS NOT NULL
""", (active_source,)) """)
rows = cursor.fetchall() rows = cursor.fetchall()
if not rows: if not rows: