Closed elParaguayo closed 3 years ago
Solved: had to add a _match_rule
too.
I can also see issue #53 talks about the matching needing to be done by the handler rather than the dispatcher which was going to be my next question.
This has confused enough people that I will make a public method that does that.
Apologies for the basic question but I am very new to dbus_next (I'm a bit more familiar with dbus and pydbus).
I'm trying to listen for signals on the session bus without creating a specific interface object.
In python dbus, you could do something like this:
I can't see the equivalent here.
I thought
add_message_handler
might be the answer but I don't seem to receive any messages at all with the following code:If I can get that to work then I can just filter messages in the handler but I get nothing at all. I suspect this means I'm just doing something very stupid but it's not obvious to me.
I can create a signal handler once I've connected to the org.mpris.MediaPlayer2.spotify interface but it may not be there when the code is run. I'm not interested in controlling the player via this, I just need the metadata, hence the signals are sufficient for me.