[PR #637] Separate QueueBehavior into ShuffleBehavior and LoopBehavior #636

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

📋 Pull Request Information

Original PR: https://github.com/jpochyla/psst/pull/637
Author: @TheForgottened
Created: 6/15/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (4)

  • d9046d3 Add new custom icon for no loop behavior
  • 90a5fee Separate QueueBehavior into ShuffleBehavior and LoopBehavior
  • eb491d1 Fix icon size
  • b60aa77 Change minimum window size to prevent overlapping

📊 Changes

10 files changed (+168 additions, -78 deletions)

View changed files

📝 psst-core/src/player/mod.rs (+12 -4)
📝 psst-core/src/player/queue.rs (+35 -24)
📝 psst-gui/src/cmd.rs (+4 -2)
📝 psst-gui/src/controller/playback.rs (+32 -14)
📝 psst-gui/src/data/config.rs (+5 -3)
📝 psst-gui/src/data/mod.rs (+13 -6)
📝 psst-gui/src/data/playback.rs (+11 -4)
📝 psst-gui/src/ui/mod.rs (+1 -1)
📝 psst-gui/src/ui/playback.rs (+48 -19)
📝 psst-gui/src/widget/icons.rs (+7 -1)

📄 Description

This PR aims to separate the QueueBehavior into ShuffleBehavior and LoopBehavior, so we are not limited to 4 pre-defined queue states.

The inspiration for this is that I always listen to my playlists in shuffle with repeat on, and this app wasn't allowing me to.

To accomplish this, an extra button was added to the UI and, in the code, QueueBehavior was turned into ShuffleBehavior and LoopBehavior. The new PLAY_LOOP_NONE SvgIcon is just a version of the PLAY_LOOP_ALL icon edited by ChatGPT, a more proper icon should probably be added.

One drawback I found is that the app crashes when trying to load a config file written before these changes, but honestly I don't know what the ideal fix (both in clean solution and respecting the app philosophy) would be, so I'll leave that up to the main faces behind the project.

Made in collaboration with @JOSEALM3IDA.


🔄 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/637 **Author:** [@TheForgottened](https://github.com/TheForgottened) **Created:** 6/15/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`d9046d3`](https://github.com/jpochyla/psst/commit/d9046d324f3d86738abe096d1b48ccf31054a69e) Add new custom icon for no loop behavior - [`90a5fee`](https://github.com/jpochyla/psst/commit/90a5fee42eaf24dae683dfb364f169662af27fcb) Separate QueueBehavior into ShuffleBehavior and LoopBehavior - [`eb491d1`](https://github.com/jpochyla/psst/commit/eb491d11b06cc5645754c508b70521965229d734) Fix icon size - [`b60aa77`](https://github.com/jpochyla/psst/commit/b60aa7746e0ada4489d729a563dcba895d94cc61) Change minimum window size to prevent overlapping ### 📊 Changes **10 files changed** (+168 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `psst-core/src/player/mod.rs` (+12 -4) 📝 `psst-core/src/player/queue.rs` (+35 -24) 📝 `psst-gui/src/cmd.rs` (+4 -2) 📝 `psst-gui/src/controller/playback.rs` (+32 -14) 📝 `psst-gui/src/data/config.rs` (+5 -3) 📝 `psst-gui/src/data/mod.rs` (+13 -6) 📝 `psst-gui/src/data/playback.rs` (+11 -4) 📝 `psst-gui/src/ui/mod.rs` (+1 -1) 📝 `psst-gui/src/ui/playback.rs` (+48 -19) 📝 `psst-gui/src/widget/icons.rs` (+7 -1) </details> ### 📄 Description This PR aims to separate the QueueBehavior into ShuffleBehavior and LoopBehavior, so we are not limited to 4 pre-defined queue states. The inspiration for this is that I always listen to my playlists in shuffle with repeat on, and this app wasn't allowing me to. To accomplish this, an extra button was added to the UI and, in the code, QueueBehavior was turned into ShuffleBehavior and LoopBehavior. The new PLAY_LOOP_NONE SvgIcon is just a version of the PLAY_LOOP_ALL icon edited by ChatGPT, a more proper icon should probably be added. One drawback I found is that the app crashes when trying to load a config file written before these changes, but honestly I don't know what the ideal fix (both in clean solution and respecting the app philosophy) would be, so I'll leave that up to the main faces behind the project. Made in collaboration with [@JOSEALM3IDA](https://github.com/JOSEALM3IDA). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#636
No description provided.