feat(slint): per-context genre filter + favorites genre filtering

Make genre_filter.rs selection per-context (HashMap keyed by "discover" /
"favorites" + a current context the popup edits), so favorites filters
independently from Discover. Discover keeps its server-side path
unchanged (reads filter_ids("discover") explicitly; its genre buttons set
the "discover" context on open). Favorites get a genre button in both
toolbars that opens the shared popup in the "favorites" context, plus the
popup overlay; derive_tracks / derive_albums filter client-side by the
selected genre NAMES (selected_names expands parents to descendants).
on_toggle / on_clear branch on the current context to re-derive favorites
instead of re-fetching Discover. AlbumSummary gains an optional `genre`
(favorites track album objects carry it; TrackItem can't, so a track
id->genre map backs the tracks filter). Persisted per-context (legacy
flat selection migrates to "discover").

cc
This commit is contained in:
vicrodh committed 2026-05-27 08:03:56 -06:00
1 parent 9c273119a6
commit 4dddd36073
8 files changed
+327 -76

No files matched your search

+2
View File
@@ -248,6 +248,8 @@ pub struct AlbumSummary {
pub image: ImageSet,
/// Label (if returned in track response)
pub label: Option<Label>,
/// Genre (when returned, e.g. on favorites track album objects).
pub genre: Option<Genre>,
}
/// Album model