Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpris broken with multiple players #13

Closed
MinmoTech opened this issue Aug 30, 2021 · 4 comments
Closed

mpris broken with multiple players #13

MinmoTech opened this issue Aug 30, 2021 · 4 comments

Comments

@MinmoTech
Copy link
Contributor

MinmoTech commented Aug 30, 2021

As soon as more than one mpv instance exists mpris breaks since currently the permission looks like this: --own-name=org.mpris.MediaPlayer2.mpv, meaning it is only able to control a single instance

To fix it, the permission should look like this: --own-name=org.mpris.MediaPlayer2.mpv.*

I copied this from the brave-browser flatpak: https://github.com/flathub/com.brave.Browser/blob/603a6497c913654d81b6a62f211d1add2553134e/com.brave.Browser.yaml#L25

fastrizwaan added a commit that referenced this issue Sep 1, 2021
@fastrizwaan
Copy link
Collaborator

fastrizwaan commented Sep 1, 2021

Please check and update after this commit aee2349 --own-name=org.mpris.MediaPlayer2.mpv.*

@fastrizwaan
Copy link
Collaborator

Please check and update after changing to --own-name=org.mpris.MediaPlayer2.mpv.*

@MinmoTech
Copy link
Contributor Author

I have changed the permission myself and it works 👍

@MinmoTech
Copy link
Contributor Author

MinmoTech commented Sep 1, 2021

Well, this way it works for 2 players, but if I open 3 or more mpv instances no no instance seems to pop up in dbus.

I assume this is an upstream issue.

Normally, when the dbus identifier "mpv" is thaken, the new instance would append it's own process id but I assume the real PID is not available inside bubblewrap so the mpris plugin simply appends "instance2".

Threrefore as soon as 3 or more instances are created this results in a name conflict.

Relevant loc: https://github.com/hoyon/mpv-mpris/blob/b2940ace43650350a0d37171393d69abbb2b7be7/mpris.c#L815

Created an issue upstream: hoyon/mpv-mpris#52

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

No branches or pull requests

2 participants