fix: malformed CSS, seasonal source column, profile_id filter, discover tab stale flag

- style.css: move orphan color declaration inside .discover-sync-card-meta so downstream rules parse correctly
- seasonal_discovery.py: branch on deezer_track_id for deezer source instead of falling through to spotify_track_id
- web_server.py: add AND profile_id = ? to discovery pool count so other profiles don't inflate the result
- init.js: reset discoverSyncPlaylistsLoaded on page leave so the discover tab refetches on revisit
This commit is contained in:
JohnBaumb 2026-04-24 01:04:50 -07:00
parent 150dd046df
commit 97b0ee960a
4 changed files with 10 additions and 6 deletions

View file

@ -371,10 +371,13 @@ class SeasonalDiscoveryService:
config = SEASONAL_CONFIG[season_key]
keywords = config['keywords']
# itunes stores IDs in itunes_track_id; all other sources
# (spotify, deezer, discogs, hydrabase, etc.) use spotify_track_id
# as the generic ID column.
track_id_col = 'itunes_track_id' if source == 'itunes' else 'spotify_track_id'
# Each source stores IDs in its own column
if source == 'itunes':
track_id_col = 'itunes_track_id'
elif source == 'deezer':
track_id_col = 'deezer_track_id'
else:
track_id_col = 'spotify_track_id'
seasonal_tracks = []

View file

@ -44263,7 +44263,7 @@ def get_discover_synced_playlists():
try:
with database._get_connection() as conn:
pool_count = conn.execute(
"SELECT COUNT(*) FROM discovery_pool WHERE source = ?", (active_source,)
"SELECT COUNT(*) FROM discovery_pool WHERE source = ? AND profile_id = ?", (active_source, pid)
).fetchone()[0]
except Exception:
pool_count = 0

View file

@ -2250,6 +2250,8 @@ async function loadPageData(pageId) {
delete discoverSyncPollers[key];
}
}
// Reset so discover tab refetches on next visit
discoverSyncPlaylistsLoaded = false;
}
switch (pageId) {
case 'dashboard':

View file

@ -59664,7 +59664,6 @@ body[data-artist-source="source"] #artist-detail-page #library-artist-enhance-bt
.discover-sync-card-meta {
display: none;
}
color: rgba(255, 255, 255, 0.4);
}