Repository navigation
Conversation
With nothing playing, the media service ranked any player holding a PipeWire stream above the player the user last chose. Chromium and Spotify keep a paused stream open, so clicking another paused player in the media popup, or pausing it with a media key, left the stream holder selected and the play key resumed it. The chosen player now comes first, and the choice lapses once another player starts playing, so a stale pick does not outrank a player used since.
[Medium impact] The PR appears safe to merge. SummaryThe PR keeps the chosen paused player selected even when another paused player holds an audio stream.
Author Reviews (1) · Last reviewed commit: "Keep the chosen media player when anothe..." · Reviewed by Greptile |
|
Codex High and Opus 5.5 High compared both diffs against current I queued the focused stream-fallback and playerctld regression cases for #9201, which has a test-file conflict with current |
Quattro removed the old media model test file in omacom#19904. Keep the regression coverage added by this PR and carry over omacom#20775’s checks for stream fallback and the playerctld proxy. Co-Authored-By: Carmine Paolino <[email protected]> Co-Authored-By: Codex GPT-6.2 Sol High <[email protected]>
|
Closing in favour of #9201, which remembers the last player that played and also covers pausing from the app itself. Thanks for the comparison. |
What changes
Fixes #17668, and the part of #12772 where a player was explicitly chosen.
When nothing is playing,
MediaModel.idlePlayer()ranked any player holding a PipeWire stream above the player the user last chose. Chromium and Spotify keep a paused stream open, so clicking another paused player in the media popup, or using a media key on it, left the stream holder selected, and Play resumed it.idlePlayer()now puts the preferred player first. The stream, track, controllable and identity fallbacks are unchanged when nothing is preferred.startedOtherPlayer(), checked insyncPlayingOrder()). Without this, a pick from hours ago would outrank a player used since; with it, that case falls back to today's ordering. The playerctld proxy does not count, and a player that was already playing when the pick was made does not either.Not covered here: with no preference at all (both players driven from their own UI), the stream holder still wins, and the preference does not survive a shell restart or a player re-registering its MPRIS object. Those need a recency signal or persisted state, which #9201 and #12772 discuss.
Verification
bash test/shell.d/media-test.shpasses. Onquattrowithout the fix it fails atnot ok - media keeps the chosen paused player over one holding a stream.bash test/shell.d/qmllint-test.shpasses.Screenshots
No visible change: the media widget looks the same; only which player it selects when nothing is playing changes.