Skip to content

linux: add setting to toggle media takeover - #748

Open
Loffah wants to merge 1 commit into
librepods-org:mainfrom
Loffah:linux-media-takeover-setting
Open

linux: add setting to toggle media takeover#748
Loffah wants to merge 1 commit into
librepods-org:mainfrom
Loffah:linux-media-takeover-setting

Conversation

@Loffah

@Loffah Loffah commented Aug 25, 2026

Copy link
Copy Markdown

What

Adds a Take Over Audio When Media Plays switch to the Linux app settings, controlling whether the app force-connects to the AirPods (and sends a disconnect request to the phone) when an MPRIS player starts playing.

Persisted as media/takeoverEnabled, defaults to true so current behavior is unchanged for existing users.

Why

handleMediaStateChange currently reacts to any MPRIS player reporting Playing, unconditionally. With multipoint AirPods this steals audio from the phone in cases the user did not intend:

  • a notification or other short sound on the desktop
  • a player stuck buffering, which still reports Playing over MPRIS

In those cases the AirPods get yanked away from the phone mid-listen. The feature itself is great; it just needs an off switch for people who share the pods between an active phone and desktop.

Testing

  • Built and running on Arch (Qt 6, AirPods Pro 3 / A3063)
  • Toggle off: desktop media no longer grabs the pods from the phone; log shows "Media started playing, but media takeover is disabled"
  • Toggle on: unchanged behavior, takeover works
  • Setting survives app restart

🤖 Generated with Claude Code

The app unconditionally force-connects to the AirPods and sends a
disconnect request to the phone whenever any MPRIS player reports
Playing. With multipoint AirPods this steals audio from the phone even
when the desktop playback was unintentional (a notification sound, or a
player stuck buffering still reports Playing).

Add a 'Take Over Audio When Media Plays' switch in settings, persisted
as media/takeoverEnabled, defaulting to true to keep the current
behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant