Nightingale Forums

Full Version: Modify Rating with Command-Line/DBus
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Some options are already possible (eg, play/pause/next/prev)

I would like to add or remove a star of the currently playing track, too.
You seem to know D-Bus. I am sure you're aware that our D-Bus implementation is an implementation of the MPRIS standard. The more recent version of MPRIS, MPRIS 2 doens't allow writing of metadata. However we also implement an older version of MPRIS, MPRIS 1. If you ever Introspected the /Player object, you'd have noticed the Method "SetMetadata", which takes two arguments: a key and a value.
More specific:
org.mpris.MediaPlayer2.nightingale /Player getMetadata(in s key, in s value)


In order to set the rating, call getMetadata with an array like this: ['rating', '5']. The value is the number of stars. And rating is actually the only key that work together with this method.

If you don't use a Nightlybuild, I don't know how you found ngale's DBus API, but just in casE: you need a Nightlybuild (Nightingale 1.12.2a) in order to get the MPRIS API on Linux.
Yes I found the DBus, but not your given method.

Code:
frozen_byte@Frozen-SRV ~> qdbus org.mpris.MediaPlayer2.nightingale /Player
signal void org.mpris.songbird.CapsChange(int)
fish: Job 1, “qdbus org.mpris.MediaPlayer2.nightingale /Player” terminated by signal SIGSEGV (Address boundary error)

d-feet also can not Find your given Object:

[Image: t6m3LSZ.jpg]

There is just one default object "/" with no specific Methods.
Oh, I forgot to change the interface name to org.mpris.MediaPlayer2.nightingale in the mpris1 implementation. I'll fix it asap.

Edit: fixed in upstream. Path is now /org/mpris/MediaPlayer2/nightingale and interface is org.freedesktop.MediaPlayer .
Sorry for my late answer, was on holidays *g*

I am on the lates nightly but still, I can not find your getMetadata() method =(

Well the B-Dus seems a bit buggy anyway, because the method List (in console) should show the same content as d-feet does.
Look at the -> Picture <-

Can anyone reproduce the error, or is it System-Related?
Hi
I just reread the DBus spec and realized Nightingale wasn't replying to the Introspect requests correctly. If you try out a new Nightingly build that has been built after the time this post was written, you should get the full lists in the DBus inspectors.
Previously Nightingale didn't recursively show the interfaces/nodes of paths deeper down than the introspect requested, which is not what is expected. An introspect on / should return everything, as far as I understand the docs.