feat(discover): Most Played Albums carousel in Home + For You

Wires the rail (top-20 by play count) into both tabs, mirroring the favoriteAlbums pattern: HomeState/ForYouState.most-played-albums DiscoverSection; foryou::most_played_album_cards maps the ranked rows onto AlbumCard; home.rs builds it inline (local, no fetch) and For You rides the favorites branch; HomeMostPlayedAlbum/ForYouMostPlayedAlbum artwork targets + apply arms; render arms in HomeView/ForYouView (self-hide while empty); title in 8 locales. slintcheck green. View-all page (search + play count) is the next increment.

cc
This commit is contained in:
vicrodh committed 2026-07-14 01:06:54 -06:00
1 parent abb529e22b
commit 1a7853d9c6
16 files changed
+133 -3

No files matched your search

+6
View File
@@ -180,6 +180,9 @@ export global HomeState {
// reorders HomeState.favorite-albums in place when this changes.
in-out property <int> library-albums-sort: 0;
in property <DiscoverSection> release-watch;
// Most Played Albums rail — top albums by local play count (title set by
// Rust from `album_play_history::top_albums`). Self-hides while empty.
in property <DiscoverSection> most-played-albums;
in property <[SlimItem]> top-artists: [];
// Qobuz Playlists row (Home + Editor's Picks). Single-cover cards; the
// active tab's set is swapped in by crate::home::select_tab.
@@ -344,6 +347,9 @@ export global ForYouState {
in property <DiscoverSection> recent-albums;
// Favorite Albums — the user's favorited albums (For You #6).
in property <DiscoverSection> favorite-albums;
// Most Played Albums — top albums by local play count (same data as
// HomeState.most-played-albums; local, not tab-specific).
in property <DiscoverSection> most-played-albums;
in property <[SlimItem]> recent-tracks: [];
in property <[SlimItem]> top-artists: [];
in property <[SlimItem]> artists-to-follow: [];