Skip to content

Add a sub-menu to the shuffle playlist menu to decide how to shuffle. - #2037

Open
Vinzzzze wants to merge 1 commit into
strawberrymusicplayer:masterfrom
Vinzzzze:shuffle_playlist
Open

Add a sub-menu to the shuffle playlist menu to decide how to shuffle.#2037
Vinzzzze wants to merge 1 commit into
strawberrymusicplayer:masterfrom
Vinzzzze:shuffle_playlist

Conversation

@Vinzzzze

@Vinzzzze Vinzzzze commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Change the menu Shuffle playlist (mainwindow ui) to offer three shuffle modes :

  • track based shuffle (the actual playlist shuffle mode)
  • album based shuffle : shuffle the playlist by album and make the album played in the track number order
  • grouped track shuffle : keep the grouped tracks together, other tracks and distinct track group are shuffled.

Correct what I consider as an issue : when playing a playlist with a mode shuffle grouped, the tracks are played in the order they have in the playlist. Grouped tracks must be played following the track number order.

Update mainwindow for updating the menus
Update playlist to make the ReshuffleIndices reusable for both Reshuffling indices when playing in shuffle mode and when shuffling the playlist from the menu. I left some commented code with a TODO mark for some code linked to another PR to remind me what to do when I will merge one branch in the other.
Update the playlistmanager and it's interface to handle the choice we can now make while shuffling a playlist.
Add the translations for the created menu

Summary by CodeRabbit

  • New Features
    • Added a Shuffle playlist submenu with three mutually-exclusive modes: Single track as random element, Album as random element, and Grouped tracks as random element (existing Ctrl+H preserved for the single-track mode).
  • Behavior Updates
    • Shuffle is now mode-aware.
    • Album and Grouped modes keep album/group boundaries and preserve disc/track ordering within the selected album or group while randomizing the chosen units.
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 4 times, most recently from b67c38c to 37f312f Compare March 20, 2026 18:24
Comment thread src/playlist/playlist.cpp Outdated
Comment thread src/playlist/playlist.cpp Outdated
Comment thread src/playlist/playlist.h Outdated
Comment thread src/playlist/playlist.h Outdated
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 3 times, most recently from da0abb6 to 151a5d1 Compare April 4, 2026 18:36
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 3 times, most recently from 9f20871 to b40c2ea Compare April 10, 2026 19:29
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 5 times, most recently from 7294324 to 32dc249 Compare April 23, 2026 22:53
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 3 times, most recently from b293551 to c867763 Compare May 10, 2026 21:41
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch from c867763 to 46e9772 Compare May 17, 2026 14:13
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 4 times, most recently from 63f0947 to e01dd29 Compare May 31, 2026 14:47
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 2 times, most recently from 0d83afe to 669ccd7 Compare June 5, 2026 19:19
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 2 times, most recently from ef4b509 to 59bfc08 Compare June 13, 2026 18:52

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/playlist/playlist.h`:
- Around line 370-371: The ReshuffleIndices function declaration is missing a
comma between the shuffle_mode parameter and the const bool
album_keep_track_order parameter. Add a comma after shuffle_mode to fix the
syntax error in the parameter list.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41daddfc-5ae5-49f0-b363-483a4ac1c5fa

📥 Commits

Reviewing files that changed from the base of the PR and between ba28391 and bf6d7b9.

📒 Files selected for processing (8)
  • src/core/mainwindow.cpp
  • src/core/mainwindow.h
  • src/core/mainwindow.ui
  • src/playlist/playlist.cpp
  • src/playlist/playlist.h
  • src/playlist/playlistmanager.cpp
  • src/playlist/playlistmanager.h
  • src/playlist/playlistmanagerinterface.h
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/playlist/playlistmanager.h
  • src/playlist/playlistmanagerinterface.h
  • src/core/mainwindow.ui
  • src/core/mainwindow.h
  • src/core/mainwindow.cpp
Comment thread src/playlist/playlist.h Outdated
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 2 times, most recently from f58a918 to 72d39a8 Compare June 21, 2026 14:03
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 5 times, most recently from a2f6091 to febaf7a Compare June 29, 2026 21:13
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 2 times, most recently from c2c070b to a1942c3 Compare July 5, 2026 15:53
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 3 times, most recently from d388cad to f12f440 Compare July 15, 2026 18:32
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 4 times, most recently from dcd0bd3 to 2a77782 Compare July 26, 2026 15:30
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 3 times, most recently from 309f2d3 to eacb7ee Compare August 2, 2026 12:12
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 3 times, most recently from 17d1da3 to 4a135ce Compare August 12, 2026 18:04
@Vinzzzze
Vinzzzze force-pushed the shuffle_playlist branch 4 times, most recently from 0729bae to cd20a23 Compare August 26, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants