Repository navigation
feat(playlists): sort playlist tracks by release date (#854) - #856
Conversation
) The playlist sort menu offers Release Date like Saved Albums. Both playlist sort paths (the loaded pages and search results, and the full refetch walk) order by each track's album release date; a track without one sorts first, as in Saved Albums. default_sort_playlist_tracks accepts release_date and release_date:desc.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
Closes #854. The sort menu on a playlist now offers Release Date (
y), like Saved Albums.SortContext::PlaylistTrackslistsSortField::ReleaseDate.TrackInfo::release_date:sort_playlist_track_matches(the loaded pages and search results) andSorter::sort_tracks(the full refetch walk). The dates areYYYY,YYYY-MMorYYYY-MM-DD, so the strings order chronologically; a track without one sorts first in ascending order, as in Saved Albums.default_sort_playlist_tracksacceptsrelease_dateandrelease_date:desc(settings options anddocs/configuration.md).release_date_sort_is_offered_for_saved_albums_onlyfrom feat(albums): show the release year on the artist page and sort saved albums by it (#698) #719 pinned the old behaviour; it is now…_for_saved_albums_and_playlists_onlyand still checks that Saved Artists and Recently Played don't offer it.Testing
macOS (aarch64), on
5e488628:cargo fmt --all --check: clean.cargo clippy --locked -- -D warnings: clean for default,all-sources, slim, headless, mcp-only and the gui feature set.cargo test --locked: slim 1598 passed; default 2078 passed, 8 ignored;all-sources2287 passed, 30 ignored; gui 1775 passed, 8 ignored (no bindings diff).release_date_sort_orders_tracks_by_date_with_undated_tracks_first,playlist_search_results_sort_by_release_date, and the updatedrelease_date_sort_is_offered_for_saved_albums_and_playlists_only. All three fail with the change reverted.Additional notes
Not tried against a live Spotify account: I haven't checked that every playlist track carries a release date. A track without one sorts as undated rather than failing.
Summary by CodeRabbit