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

Mpris2: Add new property to read/write the rating #1246

Merged
merged 1 commit into from Jul 27, 2023

Conversation

Dakes
Copy link
Contributor

@Dakes Dakes commented Jul 26, 2023

This is to create shortcuts to set the rating and/or to set it from scripts.
This feature was wished for in these threads:
https://forum.strawberrymusicplayer.org/topic/99/shortcuts-for-ratings
https://forum.strawberrymusicplayer.org/topic/326/set-ratings-per-dbus-shortcut
https://forum.strawberrymusicplayer.org/topic/879/expose-rating-of-songs-to-automation-shortcuts

This is technically out of spec for the mpris specification. But since it does not modify any of the original methods it should be fine. If you prefer I could move this to a different bus name like org.strawberry.Player.Rating or something.

Currently it can for example be accessed like this: qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Rating to get the rating of the currently playing song (As float from 0-1)
Or qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Rating 0.6 to set the rating to a float, here 0.6. (from 0-1)

@jonaski
Copy link
Member

jonaski commented Jul 27, 2023

Thanks

@jonaski jonaski merged commit f5a55ab into strawberrymusicplayer:master Jul 27, 2023
34 checks passed
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.

None yet

2 participants