Closed nipkownix closed 6 years ago
Thanks for the feedback. I'm glad people are (somehow) finding this despite myself never advertising it. :slightly_smiling_face:
Not sure if there is anything wrong with mps-youtube's mpris implementation.
From the traceback, it appears that mps-youtube doesn't fully implement the org.mpris.MediaPlayer2.Player
interface. PlaybackStatus
is not an optional property. Looking at the source code, it doesn't actually seem to be implementing any properties at all and only has method definitions, but I'm not familiar with the dbus
package. A quick check with QDBusViewer confirms this.
Created https://github.com/mps-youtube/mps-youtube/issues/839 upstream.
Also, would it be possible to "disable" discordrp-mpris automatically when Spotify is running?
Added a task to #2 for config to ignore certain players. Been thinking about that for a while, but time has been short which is why I didn't do any commits recently. I didn't know Spotify had an mpris2 interface to begin with, though, so that's perfectly understandable.
Actually, I believe I need to be more aggressive with Spotify running because it's a unique sitation. Will re-open for now.
Awesome, man. I will follow the upstream issue you created as well. Thank you so much for looking into this!
Added a catch for mps-youtube (and similarly weird mpris players) in d36ac87ad9b77538a202c13cc1863025653d3b1e and Spotify is ignored by default now (b12f9b30c70e893822e8e3f7d487917201d428f6). This will work reasonably well for now, as long as you set show_paused
to false. Otherwise, a paused player might still fight with a playing Spotify instance.
Let me know if this works for you.
Everything is working smoothly now. No more crashes and Spotify is being ignored. Also, thank you for implementing the configuration options! So, am I correct in assuming that mps-youtube and similarly weird players just are not compatible with discordrp-mpris? I'm not familiar with dbus, but from what I understood, hrnr said it's a dbus-python issue, right?
I'm not familiar with dbus, but from what I understood, hrnr said it's a dbus-python issue, right?
Pretty much. dbus-python
doesn't seem to have an easy way to have introspectable properties, which the library I use, dbussy
, relies on. The properties are there, but dbussy
doesn't see them because they are not advertised and thus doesn't allow me to read (or set) them.
I could potentially read the values in a different way or maybe use a different dbus library myself, but I like dbussy and I haven't found a proper one for asyncio yet. It's also not really worth it imo.
So, am I correct in assuming that mps-youtube and similarly weird players just are not compatible with discordrp-mpris?
mps-youtube just won't work until the thing I mention above is addressed. I'm not aware of any other players not working with discordrp-mpris, but I will add them to the readme once I get to know some.
Hey man, great utility. But I'm afraid I'm having some issues with it. When using mps-youtube, which does support mpris2, discordrp-mpris exits with this error:
Not sure if there is anything wrong with mps-youtube's mpris implementation. It seems to work fine with other applications such as Cinnamon's "audio/sound" controller.
Also, would it be possible to "disable" discordrp-mpris automatically when Spotify is running? It breaks Discord's integration with Spotify, preventing me from listening songs with friend and such.