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

D-Bus: PropertiesChanged signal does not always get emitted on track change #11

Open
selurvedu opened this issue Dec 21, 2023 · 4 comments · May be fixed by #14
Open

D-Bus: PropertiesChanged signal does not always get emitted on track change #11

selurvedu opened this issue Dec 21, 2023 · 4 comments · May be fixed by #14

Comments

@selurvedu
Copy link

selurvedu commented Dec 21, 2023

I tested this with different players, and got different results.

With Exaile and Strawberry, everything works pretty much as expected.

With Audacious and Spotify, the signal does not get emitted on track change, only on play/pause.

With Quod Libet and Qmmp, the results are quite weird. The signal does get emitted, but rather than containing data for the new track, it always contains the data for the previously playing track (the one that has finished playing or the one the user manually switched from).

I opened QDBusViewer and connected to PropertyChanged signals on both Empress and the player in question.

For Audacious and Spotify, I saw the player emitting the signals properly with correct track info.

For Qmmp, I noticed it sometimes emits a "Stopped" playback state and no track info, and then emits another one with the "Playing" state and the new track info. I guess that's what gets Empress confused.

I couldn't test this on Quod Libet because of the following error:

Error: Unable to connect to service org.mpris.MediaPlayer2.quodlibet, path /org/mpris/MediaPlayer2, interface org.freedesktop.DBus.Properties, signal PropertiesChanged
@selurvedu
Copy link
Author

P.S. I really liked your project. For many years I couldn't figure out how to control multiple playback sources with a one-stop solution, without the need to hard-code the players and with the ability to control the media playback in web browsers. Once I noticed that KDE Connect lets me do exactly that, except it was phone-only, I knew I got closer to solving this. Then I found Empress, and it turned out to be exactly what I was looking for, the final missing piece, because Empress itself can be controlled and monitored via D-Bus.

@ray-kast
Copy link
Owner

ray-kast commented Oct 27, 2024

oh oop I'm so sorry this slipped through my GitHub inbox!! i just saw all three of your issues, i'll see what i can do!

@ray-kast ray-kast linked a pull request Oct 27, 2024 that will close this issue
8 tasks
@ray-kast
Copy link
Owner

ray-kast commented Nov 20, 2024

@selurvedu For this issue and #12, are you able to change how you run the empress server to pass -vvv as an argument and forward any relevant log sections from its output? I'm trying to track down where exactly this is happening in the server code.

If you're using the systemd unit file for empress, it should be as simple as replacing empress server with empress server -vvv wherever the file is installed.

@ray-kast
Copy link
Owner

Actually, addendum to this—I just pushed a bunch of changes here. This includes fixing the missing property listeners, refactoring a bunch of old player-tracking jank, and some diagnostic fixes/hacks. If you're able to build and run that (with empress server -vvv) and check whether the error is still reproducible that'd be fantastic.

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 a pull request may close this issue.

2 participants