mirror of
https://github.com/jpochyla/psst.git
synced 2026-04-27 07:25:52 +03:00
[PR #392] [MERGED] Playlist Sorting #511
Labels
No labels
api
bug
build
documentation
duplicate
enhancement
good first issue
help wanted
idea
invalid
linux
lowprio
macos
pull-request
upstream
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/psst#511
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jpochyla/psst/pull/392
Author: @JonVaysman
Created: 4/21/2023
Status: ✅ Merged
Merged: 4/22/2023
Merged by: @Insprill
Base:
master← Head:master📝 Commits (10+)
7d703fdBegan work on playlist sorting feature.f8bcfa9Merge branch 'master' from upstreambf41e27Added commands for sort3a94a56Modified sort button to only appear when75df0bdStatic context menu for sort options.266d55dRename DROPDOWN icon SVG to DOWN.fd965b4Fixed bug where sort button prescence wasb25b706Added persistent storage options to config.rs forab6e292Implemented visual order toggle for sort buttone5b863fFixed style in mod.rs related to sorting.📊 Changes
10 files changed (+292 additions, -13 deletions)
View changed files
📝
psst-gui/src/cmd.rs(+11 -0)📝
psst-gui/src/controller/mod.rs(+2 -0)📝
psst-gui/src/controller/nav.rs(+8 -1)➕
psst-gui/src/controller/sort.rs(+79 -0)📝
psst-gui/src/data/config.rs(+29 -0)📝
psst-gui/src/data/mod.rs(+6 -2)📝
psst-gui/src/ui/mod.rs(+79 -2)📝
psst-gui/src/ui/playlist.rs(+56 -8)📝
psst-gui/src/widget/icons.rs(+13 -0)📝
psst-gui/src/widget/mod.rs(+9 -0)📄 Description
Resolves #372
I implemented the feature as described, adding an arrow that indicates descending or ascending order. You can also right click the arrow to select different sorting criteria. It defaults to date added and ascending order, which is the default order of both Spotify and Psst. I implemented the sorting criteria in Spotify, plus sorting by artist name. Sort preferences persist across playlists and across boots of the application.
A potential improvement would be to manipulate the underlying data structure of a playlist to sort the tracks, rather than just refreshing the playlist and sorting the tracks at the time they are fetched, which is what this does.
Implemented in collaboration with @podojilr
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.