[GH-ISSUE #21] Playback shuffle and looping controls #20

Closed
opened 2026-02-28 14:30:01 +03:00 by kerem · 6 comments
Owner

Originally created by @reynn on GitHub (Jan 14, 2021).
Original GitHub issue: https://github.com/jpochyla/psst/issues/21

So far this has been great for me, minimal issues. One thing that is keeping this from being the only thing I use is a shuffle/random option. I was looking through the code and would like to contribute code for this purpose. If this is good with you I'll spend some time looking through code to find places to update but any info would be great!

I do see there are SVG icons for the control buttons, how were these generated in case we will need more?

Originally created by @reynn on GitHub (Jan 14, 2021). Original GitHub issue: https://github.com/jpochyla/psst/issues/21 So far this has been great for me, minimal issues. One thing that is keeping this from being the only thing I use is a shuffle/random option. I was looking through the code and would like to contribute code for this purpose. If this is good with you I'll spend some time looking through code to find places to update but any info would be great! I do see there are SVG icons for the control buttons, how were these generated in case we will need more?
kerem 2026-02-28 14:30:01 +03:00
Author
Owner

@jpochyla commented on GitHub (Jan 14, 2021):

Hi, happy that you like it! Although I don't use them myself, both looping and shuffling would be good to have, I agree. I think I'll eventually get to it, but if you'd like to try yourself, probably the Queue struct in audio_player.rs would be the place for this. Is looping and shuffling mutually exclusive? First idea is to add a QueueBehaviour enum to the queue with variants in like of Sequential, Random, LoopTrack, LoopQueue and control it with AudioPlayer commands.

All the icons are either from https://ionicons.com Figma plugin, or custom-drawn.

<!-- gh-comment-id:760386703 --> @jpochyla commented on GitHub (Jan 14, 2021): Hi, happy that you like it! Although I don't use them myself, both looping and shuffling would be good to have, I agree. I think I'll eventually get to it, but if you'd like to try yourself, probably the `Queue` struct in `audio_player.rs` would be the place for this. Is looping and shuffling mutually exclusive? First idea is to add a `QueueBehaviour` enum to the queue with variants in like of `Sequential, Random, LoopTrack, LoopQueue` and control it with `AudioPlayer` commands. All the icons are either from https://ionicons.com Figma plugin, or custom-drawn.
Author
Owner

@reynn commented on GitHub (Jan 14, 2021):

Thanks! I'll try to tackle this over the weekend and hopefully get a PR up for you

<!-- gh-comment-id:760487919 --> @reynn commented on GitHub (Jan 14, 2021): Thanks! I'll try to tackle this over the weekend and hopefully get a PR up for you
Author
Owner

@jpochyla commented on GitHub (Jan 28, 2021):

Initial playback looping/shuffle has been merged in. @reynn please test, so we can either close this or improve it, thanks!

<!-- gh-comment-id:769202142 --> @jpochyla commented on GitHub (Jan 28, 2021): Initial playback looping/shuffle has been merged in. @reynn please test, so we can either close this or improve it, thanks!
Author
Owner

@reynn commented on GitHub (Jan 29, 2021):

Thanks I'll take a look, sorry this was so delayed I was working on another project briefly

<!-- gh-comment-id:770036787 --> @reynn commented on GitHub (Jan 29, 2021): Thanks I'll take a look, sorry this was so delayed I was working on another project briefly
Author
Owner

@reynn commented on GitHub (Feb 1, 2021):

For the most part this works, there is just a small bug with looping in that it never seems to play the last track. I put up PR #31 to attempt a resolution.

<!-- gh-comment-id:770526350 --> @reynn commented on GitHub (Feb 1, 2021): For the most part this works, there is just a small bug with looping in that it never seems to play the last track. I put up PR #31 to attempt a resolution.
Author
Owner

@jpochyla commented on GitHub (Mar 12, 2021):

Hi @reynn, I've tried to improve the queue behaviour a little in 9c5767ab7, Random now plays a shuffled queue instead of random tracks (and finishes after playing the last one), LoopTrack now supports Previous/Next buttons.

<!-- gh-comment-id:797692374 --> @jpochyla commented on GitHub (Mar 12, 2021): Hi @reynn, I've tried to improve the queue behaviour a little in 9c5767ab7, `Random` now plays a shuffled queue instead of random tracks (and finishes after playing the last one), `LoopTrack` now supports Previous/Next buttons.
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#20
No description provided.