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:
parent
bb9564ee88
commit
f3bb8d2f0f
1 changed files with 4 additions and 3 deletions
|
|
@ -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…
Reference in a new issue