Skip to content

fix(mpris): fall back to next non-ignored player and prefer playing players#4846

Open
BlueManCZ wants to merge 3 commits intoAlexays:masterfrom
BlueManCZ:fix-mpris-fallback-player
Open

fix(mpris): fall back to next non-ignored player and prefer playing players#4846
BlueManCZ wants to merge 3 commits intoAlexays:masterfrom
BlueManCZ:fix-mpris-fallback-player

Conversation

@BlueManCZ
Copy link

@BlueManCZ BlueManCZ commented Feb 11, 2026

When using playerctld, the MPRIS module had several issues with player selection:

  • Ignored players caused widget to disappear — If the most recently active player was in
    ignored-players, getPlayerInfo() returned std::nullopt with no fallback, hiding the widget
    entirely even when other valid players were available.
  • Non-playing players took priority — Opening a new player (e.g. Spotify) would immediately
    take over the widget even if another player (e.g. Tidal) was actively playing, because playerctld
    orders by most recently active rather than playback state.
  • Widget flickered on player changesonPlayerStop hid the widget before triggering the
    update, causing a visible flash before update() re-showed it with the correct player.

Changes

  • Iterate through playerctld's activity-ordered player list, skipping ignored players, and prefer
    a playing player over a paused/stopped one
  • When the selected player differs from the playerctld proxy's top player, create a direct
    PlayerctlPlayer connection for correct metadata
  • Remove premature event_box_.set_visible(false) from onPlayerStopupdate() already
    handles visibility

Test plan

  • Configure ignored-players with a browser (e.g. ["firefox"]), have another player paused
    — widget should show the paused player with correct metadata when browser plays media
  • Play Tidal, then open Spotify without playing — widget should stay on Tidal
  • Play Spotify while Tidal is paused — widget should switch to Spotify
  • Pause all players — widget displays last active player as paused
  • With all players ignored — widget should hide
  • Player changes should not cause visible flicker

Fixes: #1954, fixes: #3879, fixes: #4610

@BlueManCZ BlueManCZ changed the title fix(mpris): fall back to next non-ignored player instead of hiding widget fix(mpris): fall back to next non-ignored player and prefer playing players Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant

Comments