Improve media ipc#3155
Conversation
In MPRIS Pause is the generally useful and expected command instead of Stop. Stop is very inconsistently implemented in players and semantically it includes clearing the track position. Also, `media toggle` already uses pause semantics instead of stop. We might want to consider renaming our ipc command to `media pause`, but I don't think it matters much. I don't think anyone actually wants the Stop command for anything.
I was consistently having issues where my paused player was marked as playing.
Automatically clear the pinned player preference when another player is playing and the pinned player is not. This lets an explicit player choice stay active while relevant, but avoids a paused pinned player blocking active playback from another source.
0fed9c8 to
16eb24c
Compare
|
Review: PR #3155 — "Improve media ipc" What it does: Adds media play, media next-player, and media previous-player IPC actions; reworks stop() to prefer Pause over Stop (and no longer dismiss the player); and reworks applyPlayerSnapshot so the active/pinned player auto-follows whichever player starts/stops playing. It also drops two pause-recovery playbackStatus = "Playing" overrides. Overall a reasonable UX improvement, but it leaves orphaned subsystems and reverts a deliberate heuristic without explanation. Findings (most severe first)
Design note (not a bug) The new becamePlaying clear logic resets an explicit user pin (media next-player) as soon as any other player starts playing while the pinned one isn't playing. That matches the "active follows playback" intent, but it does mean an explicit pin to a paused player is silently overridden by background playback — worth a sentence in the PR/commit so it's a documented choice rather than a surprise. |
This adds
and changes some logic in the mpris service so that it's a lot more convenient and behaves the way I would expect.
Type of Change
Manual Coverage
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed.