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

Don't handle FinishedTrack as Stopped #403

Merged
merged 2 commits into from
Jan 20, 2021
Merged

Don't handle FinishedTrack as Stopped #403

merged 2 commits into from
Jan 20, 2021

Conversation

Qluxzz
Copy link
Contributor

@Qluxzz Qluxzz commented Jan 19, 2021

Currently FinishedTrack and Stopped both returned "Stopped" leading mpris to report stopped after every track and then playing again when the new track starts.

Not sure if I am allowed to not return a value when we don't have a valid PlaybackState value. The docs for the PlaybackState states "When this property changes, the org.freedesktop.DBus.Properties.PropertiesChanged signal is emitted with the new value."

but I'm not very knowledgeable with DBus.

I've not encountered any weird behaviour using the same debugging technique described in #395.

Fixes #395

@hrkfdn
Copy link
Owner

hrkfdn commented Jan 20, 2021

Thanks for tackling this. I took a look to see what happens if we just add nothing with gdbus introspect --session --dest org.mpris.MediaPlayer2.ncspot --object-path '/org/mpris/MediaPlayer2' --only-properties and in those cases the value seems to be empty, which it seems would violate the MPRIS specs. I'd suggest to just keep the state at Playing when FinishedTrack was emitted, as it should be followed by a Stopped event. I will commit the changes in a second.

@hrkfdn hrkfdn merged commit 5b40fc6 into hrkfdn:master Jan 20, 2021
@Qluxzz Qluxzz deleted the fix-mpris-state-bouncing branch January 27, 2021 15:01
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 this pull request may close these issues.

[mpris] Play State bouncing
2 participants