-
Notifications
You must be signed in to change notification settings - Fork 16
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
Multiple player dev #21
base: master
Are you sure you want to change the base?
Conversation
I have no idea how to request review.... |
So apparently the PR author can't request review so I'm just have to tag you @mheine :) |
Note: I just got a |
Assigned myself as a reviewer, hoping to add some thoughts and input when I find the time 🧑💻 |
Thread about checking which player is open |
(I'm on Ubuntu with Gnome Shell and not willing to install KDE Plasma tbh) Every other player works for me and issue #16 (specifically Rhythmbox & Clementine) is solved :) |
However checking the open player is difficult, the thread I posted earlier uses |
School starts again for me tomorrow so unfortunately I'll be quite inactive o7 |
Protects against future behaviour change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of general suggestions:
- It might turn out to be easier to access DBus directly rather than shelling out to
dbus-send
. - Gnome Shell already features an MPRIS client that is used to populate the now-playing info in the notification area. Perhaps this code could be substantially reused?
Hope this helps!
if (players[windowName]) | ||
return players[windowName]; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about players that don't have windows? E.g., https://github.com/mavit/slimpris2/
It make more sense to ask DBus for a list of available players. E.g.,
dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep -E '^ +string "org\.mpris\.MediaPlayer2\.'
Start of attempt to solve #16 (request to support other players)
Also extension.js:59 there should be
let/var
beforechildren
as it's previously undefined and was giving JS Warnings in Gnome-SHELL logs.I still need to check the other players and check which other players support MPRIS, including Clementine & RhythmBox that the issue OP wanted (I mean add it to the
players
object and check it works).