Upgrade the MPris2 definitions#2029
Upgrade the MPris2 definitions#2029Vinzzzze wants to merge 2 commits intostrawberrymusicplayer:masterfrom
Conversation
Shuffle needs to be bool: https://specifications.freedesktop.org/mpris/latest/Player_Interface.html#Property:Shuffle |
|
ok, I will change my PR to match these requirements : no new method and Shuffle will be bool |
f2e595d to
1ffa3ff
Compare
be5291c to
a903658
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the MPRIS2 implementation to expose a fuller TrackList/Playlists feature set (track enumeration, metadata lookup, add/remove/goto operations, and playlist ordering), and adds support for an “Album” loop mode.
Changes:
- Expose playlist playback order indices via
Playlist::virtual_items()for MPRIS TrackList integration. - Implement
Tracks,GetTracksMetadata,AddTrack,RemoveTrack, andGoToinMpris2. - Add basic sorting support in
GetPlaylists(order, reverse_order)and extend LoopStatus handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/playlist/playlist.h |
Adds a getter to expose virtual_items_ (playback order indices) to other components (MPRIS). |
src/mpris2/mpris2.cpp |
Implements/updates MPRIS2 TrackList and Playlists behaviors (loop status, tracks enumeration, metadata, add/remove/goto, playlist ordering). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
42692f1 to
d99254c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4494040 to
7ca94f8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7994a84 to
4ac6add
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
According to the specifications https://mpris2.readthedocs.io/en/latest/mpris2.tracklist.html, the track ID's need to be unique and not change, when reshuffling, what songs virtual_items_ point to will change so we can't use that, so I removed use of that so it's using the playlist item indexes, but I realize we can't use that either since it changes when inserting, removing or moving songs in the playlist.
We can't use song_id, because only collection songs have that, so I think we need to introduce a unique identifier to the playlist items.
Also, according to the documentation, TrackList should not return the entire playlist, but only the items in the queue + some of the previously played songs.
And AddTrack / RemoveTrack need to emit TrackAdded / TrackRemoved, but the signals needs to be emitted after the songs have been inserted in the playlist and a unique ID has been allocated.
So implementing this is much more complicated than I originally thought.
Ok, got it. If you want, we can close this PR until having the right idea to solve theses issues. I am very interested by being able to control the player from the command line. |
e413fc7 to
2f7b807
Compare
80c4618 to
5f4b1c9
Compare
|
Let's just leave this open, then add the required changes separately, merge those first, then rebase this after it's implented. |
2a8518f to
3f8c391
Compare
|
Hello, |
5c6f801 to
e6c21a8
Compare
Properties / methods updated :