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:
parent
150dd046df
commit
97b0ee960a
4 changed files with 10 additions and 6 deletions
|
|
@ -371,10 +371,13 @@ class SeasonalDiscoveryService:
|
||||||
config = SEASONAL_CONFIG[season_key]
|
config = SEASONAL_CONFIG[season_key]
|
||||||
keywords = config['keywords']
|
keywords = config['keywords']
|
||||||
|
|
||||||
# itunes stores IDs in itunes_track_id; all other sources
|
# Each source stores IDs in its own column
|
||||||
# (spotify, deezer, discogs, hydrabase, etc.) use spotify_track_id
|
if source == 'itunes':
|
||||||
# as the generic ID column.
|
track_id_col = 'itunes_track_id'
|
||||||
track_id_col = 'itunes_track_id' if source == 'itunes' else 'spotify_track_id'
|
elif source == 'deezer':
|
||||||
|
track_id_col = 'deezer_track_id'
|
||||||
|
else:
|
||||||
|
track_id_col = 'spotify_track_id'
|
||||||
|
|
||||||
seasonal_tracks = []
|
seasonal_tracks = []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44263,7 +44263,7 @@ def get_discover_synced_playlists():
|
||||||
try:
|
try:
|
||||||
with database._get_connection() as conn:
|
with database._get_connection() as conn:
|
||||||
pool_count = conn.execute(
|
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]
|
).fetchone()[0]
|
||||||
except Exception:
|
except Exception:
|
||||||
pool_count = 0
|
pool_count = 0
|
||||||
|
|
|
||||||
|
|
@ -2250,6 +2250,8 @@ async function loadPageData(pageId) {
|
||||||
delete discoverSyncPollers[key];
|
delete discoverSyncPollers[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Reset so discover tab refetches on next visit
|
||||||
|
discoverSyncPlaylistsLoaded = false;
|
||||||
}
|
}
|
||||||
switch (pageId) {
|
switch (pageId) {
|
||||||
case 'dashboard':
|
case 'dashboard':
|
||||||
|
|
|
||||||
|
|
@ -59664,7 +59664,6 @@ body[data-artist-source="source"] #artist-detail-page #library-artist-enhance-bt
|
||||||
|
|
||||||
.discover-sync-card-meta {
|
.discover-sync-card-meta {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
|
||||||
color: rgba(255, 255, 255, 0.4);
|
color: rgba(255, 255, 255, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue