Skip to content

Grouped tracks are considered as a single track.#2028

Open
Vinzzzze wants to merge 1 commit intostrawberrymusicplayer:masterfrom
Vinzzzze:queued_after_grouping
Open

Grouped tracks are considered as a single track.#2028
Vinzzzze wants to merge 1 commit intostrawberrymusicplayer:masterfrom
Vinzzzze:queued_after_grouping

Conversation

@Vinzzzze
Copy link
Copy Markdown
Contributor

@Vinzzzze Vinzzzze commented Mar 4, 2026

consider the grouped tracks as one track so the queued tracks cannot interrupt the grouped tracks play :

  • add a parameter to the Playlist::next_row method to handle this
  • add a method Song::IsOnSameGrouping
  • add the attribute next_song_after_queued_ to remember the position where to go back when the queued rest is finish

add a configuration to define the behavior of the queued tracks in front of the grouped tracks :

  • add the GROUPED_BEFORE_QUEUE_DEFAULT constexpr that define the default value for this configuration (default value set to 1 to keep the current behavior and ignore the grouped tracks)
  • add the update_grouped_before_queue method to set the playlist objects with the value set in the ui
  • use left_grouped_song_before_queue_ & init_grouped_song_before_queue_ to determine what to do next when we have queued tracks while reading grouped tracks
  • add the ui in the backendsettingspage,in the background management tab.
  • add a tool-tip on the created spinbox to explain how this parameter is used.
  • translations had been prepared, but only the french one had been done.

correct the previous row to navigate in the playlist :

  • update the Playlist::previous_row code
  • use only the navigation in the playlist to determine the previous row
  • if we are on queued track read, use next_song_after_queued_ attribute to determine the position where to go back (that is to say that queued tracks are ignored in this navigation)

Values for the added parameter :
0 : wait for the end of all the grouped tracks on the same group than the current read track before playing the queued track(s)
1 : ignore the grouping attribute and read the queued track after the end of the current played track
n : wait for the end of the read of the n tracks of the current played track (the current one is the first of the n). If there is less than n grouped tracks to read, wait for the end of all the grouped tracks (same group than the current read track) to start the read of the queued track(s). If the read track is not a grouped track, the queued track(s) will be read just after it.
No maximum had been set.
I will use it this 0 : never interrupt grouped tracks.

@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch 2 times, most recently from 06e7f01 to 70cfe97 Compare March 7, 2026 13:21
Comment thread src/playlist/playlist.cpp
@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch 3 times, most recently from c1c99e8 to d387ec1 Compare March 17, 2026 21:07
@Vinzzzze Vinzzzze requested a review from jonaski March 17, 2026 21:10
@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch 3 times, most recently from 55e69c5 to dad492f Compare March 20, 2026 18:26
@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch from dad492f to 07bd73e Compare March 26, 2026 18:38
Comment thread src/engine/enginebase.h Outdated
Comment thread src/core/application.cpp Outdated
Comment thread src/constants/backendsettings.h Outdated
@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch 4 times, most recently from 2ac3629 to 2e3d545 Compare March 29, 2026 16:50
@Vinzzzze Vinzzzze requested a review from jonaski March 29, 2026 21:53
@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch from 2e3d545 to 723cd78 Compare April 4, 2026 18:34
@jonaski
Copy link
Copy Markdown
Member

jonaski commented Apr 6, 2026

I'm not sure if I want to add this, have to think about it. I doubt many users use shuffle by grouping and if we were to add something like this it makes sense to have the option for album shuffle too, not just grouping.
One thing I see: There is no need to bring the settings logic into SmartPlaylistSearchPreview, it only uses the Playlist model for view, no play logic is used there.

@jonaski
Copy link
Copy Markdown
Member

jonaski commented Apr 6, 2026

Another thing, please don't add translations updates into the PR's, it's just unnecessary noise, it's better to update the translation sources with make update_translations separately after the PR's are merged and let Crowin fill in the new tr's for all the languages.

@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch 5 times, most recently from 9bb40c1 to 2319a1b Compare April 10, 2026 20:38
@Vinzzzze
Copy link
Copy Markdown
Contributor Author

Hello,
I removed the translation files, then with the «make update_translations» I can regenerate the en_US file, and I have to create a PR with this file alone ?

For the SmartPlaylistSearchPreview, I use default parameter value. As it is a QObject derivated class, I left the Parent parameter at last position.

@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch from 2319a1b to 2eaef26 Compare April 15, 2026 17:39
   - consider the grouped tracks as one track so the queued tracks cannot interrupt the grouped tracks play
   - add a configuration to define the behavior of the queued tracks in front of the grouped tracks
@Vinzzzze Vinzzzze force-pushed the queued_after_grouping branch from 2eaef26 to 6ea906d Compare April 18, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants