[PR #392] [MERGED] Playlist Sorting #511

Closed
opened 2026-02-28 14:33:16 +03:00 by kerem · 0 comments
Owner

📋 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: masterHead: master


📝 Commits (10+)

  • 7d703fd Began work on playlist sorting feature.
  • f8bcfa9 Merge branch 'master' from upstream
  • bf41e27 Added commands for sort
  • 3a94a56 Modified sort button to only appear when
  • 75df0bd Static context menu for sort options.
  • 266d55d Rename DROPDOWN icon SVG to DOWN.
  • fd965b4 Fixed bug where sort button prescence was
  • b25b706 Added persistent storage options to config.rs for
  • ab6e292 Implemented visual order toggle for sort button
  • e5b863f Fixed 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.

image image image

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.

## 📋 Pull Request Information **Original PR:** https://github.com/jpochyla/psst/pull/392 **Author:** [@JonVaysman](https://github.com/JonVaysman) **Created:** 4/21/2023 **Status:** ✅ Merged **Merged:** 4/22/2023 **Merged by:** [@Insprill](https://github.com/Insprill) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`7d703fd`](https://github.com/jpochyla/psst/commit/7d703fd4c348c9050b7c5f2941e779cc487aa056) Began work on playlist sorting feature. - [`f8bcfa9`](https://github.com/jpochyla/psst/commit/f8bcfa9033b9976ec692ad8c63c7f038f1dd1819) Merge branch 'master' from upstream - [`bf41e27`](https://github.com/jpochyla/psst/commit/bf41e27f8973d6662c499c342a3db83267a46ac6) Added commands for sort - [`3a94a56`](https://github.com/jpochyla/psst/commit/3a94a560ee8c6bd7ccd5938b887be2afa88f4002) Modified sort button to only appear when - [`75df0bd`](https://github.com/jpochyla/psst/commit/75df0bd60a92491d596ebca8b6e8c86996d68c5d) Static context menu for sort options. - [`266d55d`](https://github.com/jpochyla/psst/commit/266d55d95fef7ca9cf96f5f86c8567f6373a81dd) Rename DROPDOWN icon SVG to DOWN. - [`fd965b4`](https://github.com/jpochyla/psst/commit/fd965b454e1c8a77921e18fe4d89eb9bcd8e601e) Fixed bug where sort button prescence was - [`b25b706`](https://github.com/jpochyla/psst/commit/b25b7066502e1f5e0ab55cc5deb05eb27595f663) Added persistent storage options to config.rs for - [`ab6e292`](https://github.com/jpochyla/psst/commit/ab6e292aa6c49aa18c2fa1f99da305acaea03f59) Implemented visual order toggle for sort button - [`e5b863f`](https://github.com/jpochyla/psst/commit/e5b863fefa35c4f37f962be9eb4cf6c8d3ada219) Fixed style in mod.rs related to sorting. ### 📊 Changes **10 files changed** (+292 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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. <img width="257" alt="image" src="https://user-images.githubusercontent.com/4923948/233729414-7c8a7b2f-a6ee-4bb2-841f-db44a8603489.png"> <img width="237" alt="image" src="https://user-images.githubusercontent.com/4923948/233729458-e0978de7-8399-44d9-9806-da0dc5d9939e.png"> <img width="128" alt="image" src="https://user-images.githubusercontent.com/4923948/233729492-d62f3765-662c-4cb9-bc58-2e10ee5d8493.png"> 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:33:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#511
No description provided.