Grouped tracks are considered as a single track. - #2028
Conversation
06e7f01 to
70cfe97
Compare
c1c99e8 to
d387ec1
Compare
55e69c5 to
dad492f
Compare
dad492f to
07bd73e
Compare
2ac3629 to
2e3d545
Compare
2e3d545 to
723cd78
Compare
|
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. |
|
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 |
9bb40c1 to
2319a1b
Compare
|
Hello, For the SmartPlaylistSearchPreview, I use default parameter value. As it is a QObject derivated class, I left the Parent parameter at last position. |
6ea906d to
956b05b
Compare
7b09eb9 to
cd02e05
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/settings/playlistsettingspage.cpp (2)
58-75: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winImprove tooltip localization quality by translating full sentences.
Current text is fragmented (
"0:"/"1:"outside translation + leading-space sentence fragments), which is harder to localize cleanly and produces awkward English phrasing.Suggested refactor
- "<span style=\"font-weight:600;\">0:</span> "_L1 + - QObject::tr(" is used to say that the queued track will wait for the end of the current track group before being played.") + + QObject::tr("<span style=\"font-weight:600;\">0:</span> Play all tracks in the current group before queued tracks.") + ... - "<span style=\"font-weight:600;\">1:</span> "_L1 + - QObject::tr(" is used to say that the queued track will be played after the end of the current track, whatever it belongs to a group or not.") + + QObject::tr("<span style=\"font-weight:600;\">1:</span> Play queued tracks after the current track ends.") +🤖 Prompt for 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. In `@src/settings/playlistsettingspage.cpp` around lines 58 - 75, The tooltip in PlaylistSettingsPage::GroupingBeforeQueueToolTip is split into fragmented translated pieces, making localization awkward and the English phrasing unnatural. Refactor the HTML text so each explanation is a full translatable sentence, including the “0:” and “1:” meanings and the surrounding text, rather than concatenating leading-space fragments and partial clauses. Keep the same tooltip content, but build it from complete QObject::tr strings so translators can reorder and adapt the sentences cleanly.
34-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDecouple settings UI from
playlist/playlist.hfor default value ownership.Pulling
GROUPED_BEFORE_QUEUE_DEFAULTfromplaylist/playlist.hadds an avoidable UI→playlist dependency. Consider moving that default to playlist settings constants (next tokGroupingBeforeQueue) so this page only includes settings-layer headers.Suggested refactor
-#include "playlist/playlist.h" +#include "constants/playlistsettings.h"- ui_->spinbox_grouping_before_queue->setValue(s.value(kGroupingBeforeQueue, GROUPED_BEFORE_QUEUE_DEFAULT).toInt()); + ui_->spinbox_grouping_before_queue->setValue( + s.value(kGroupingBeforeQueue, kGroupingBeforeQueueDefault).toInt());🤖 Prompt for 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. In `@src/settings/playlistsettingspage.cpp` at line 34, The playlist settings page is depending directly on playlist/playlist.h just to read GROUPED_BEFORE_QUEUE_DEFAULT; move that default into the settings/constants layer alongside kGroupingBeforeQueue so playlistsettingspage.cpp only includes settings-layer headers. Update the relevant settings constant definition and any references in the playlist settings UI to use the new settings-owned default symbol, removing the playlist header include from this page.
🤖 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.
Nitpick comments:
In `@src/settings/playlistsettingspage.cpp`:
- Around line 58-75: The tooltip in
PlaylistSettingsPage::GroupingBeforeQueueToolTip is split into fragmented
translated pieces, making localization awkward and the English phrasing
unnatural. Refactor the HTML text so each explanation is a full translatable
sentence, including the “0:” and “1:” meanings and the surrounding text, rather
than concatenating leading-space fragments and partial clauses. Keep the same
tooltip content, but build it from complete QObject::tr strings so translators
can reorder and adapt the sentences cleanly.
- Line 34: The playlist settings page is depending directly on
playlist/playlist.h just to read GROUPED_BEFORE_QUEUE_DEFAULT; move that default
into the settings/constants layer alongside kGroupingBeforeQueue so
playlistsettingspage.cpp only includes settings-layer headers. Update the
relevant settings constant definition and any references in the playlist
settings UI to use the new settings-owned default symbol, removing the playlist
header include from this page.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c60375b7-ff2b-4496-9f27-42ce871825ac
📒 Files selected for processing (12)
src/constants/playlistsettings.hsrc/core/player.cppsrc/core/song.cppsrc/core/song.hsrc/playlist/playlist.cppsrc/playlist/playlist.hsrc/playlist/playlistmanager.cppsrc/playlist/playlistmanager.hsrc/settings/playlistsettingspage.cppsrc/settings/playlistsettingspage.hsrc/settings/playlistsettingspage.uisrc/smartplaylists/smartplaylistsearchpreview.cpp
✅ Files skipped from review due to trivial changes (1)
- src/settings/playlistsettingspage.h
🚧 Files skipped from review as they are similar to previous changes (10)
- src/smartplaylists/smartplaylistsearchpreview.cpp
- src/constants/playlistsettings.h
- src/playlist/playlistmanager.cpp
- src/core/song.h
- src/core/song.cpp
- src/core/player.cpp
- src/playlist/playlistmanager.h
- src/settings/playlistsettingspage.ui
- src/playlist/playlist.h
- src/playlist/playlist.cpp
|
Can you please confirm that you found the suggested refactor more readable ? For me, it is not the case, but if you agree I will do it. |
eea37e5 to
afbf5f6
Compare
1b95ff6 to
25e4623
Compare
4831c34 to
b450967
Compare
7bc19a0 to
8b1a398
Compare
5286232 to
82a2a6c
Compare
5396477 to
86da3f4
Compare
c261808 to
1ebbad9
Compare
- 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
1ebbad9 to
02c28de
Compare
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 :
correct the previous row to navigate in the playlist :
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.
Summary by CodeRabbit
New Features
Improved Playback Behavior