You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a4ee59c
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add recommended songs section to custom playlists (#951)
* feat(playlist): add recommended songs section to custom playlists
Show a second "recommended songs" card under user-created playlists while
online, seeded from the playlist's own tracks rather than the user's
listening history.
- Extract the seed-scoring core (_getRecommendationsFromSeedSongs) shared
by the home screen's "recommended for you" list and the new section
- getRecommendedSongsForPlaylist: reservoir-sample a few seed tracks in a
single pass so the cost stays flat for large playlists and the picks
rotate on a real refetch; drop songs already in the playlist; return an
empty list on failure so the caller hides the section
- Cache the last fetched batch per playlist (in-memory, cleared on app
restart) so reopening the same playlist reuses it instead of refetching,
until it runs out of songs that aren't already in the playlist
- RecommendedSongsSection: shared widget used by both places
- SongBar: optional onAdd callback that swaps the trailing overflow menu
for a single add button, used here so a recommended song can be added
to the playlist with one tap instead of opening the full song menu
- Cap how many recommended rows render at once (5) so artwork loading
for the whole batch doesn't land in a single frame on low-end devices
- Gate the section on user-created + online + non-empty; hide it while
loading and on empty/failed fetch (covers "online mode but no network")
* refactor(playlist): improve documentation for recommended songs functionality
---------
Co-authored-by: Valeri Gokadze <gokadze.v1@gmail.com>
0 commit comments