[mpris] mpris:trackId in Metadata
Bertrand Lorentz
bertrand.lorentz at gmail.com
Fri Nov 4 13:51:43 CET 2011
On Fri, Nov 4, 2011 at 1:28 PM, mirsal <mirsal at mirsal.fr> wrote:
> On Fri, 2011-11-04 at 11:38 +0000, Alex Merry wrote:
>> On 03/11/11 21:25, Alex Merry wrote:
>> > So: should the spec stay as it is (with inconsistent types for the track
>> > id), or should it change to state that the mpris:trackId entry should be
>> > of D-Bus type 'o'? Note that the track id is supposed to be an opaque
>> > value from the POV of MPRIS (although the referenced path might be a
>> > valid object).
>>
>> I'd prefer it to always be of type 'o', but does anyone depend on
>> different behaviour (eg: Unity's sound menu)?
>
> I too think it should be of type 'o'.
> Though according to the dbus spec, the following validation rules apply to object paths:
>
> * The path may be of any length.
> * The path must begin with an ASCII '/' (integer 47) character, and must consist of elements separated by slash characters.
> * Each element must only contain the ASCII characters "[A-Z][a-z][0-9]_"
> * No element may be the empty string.
> * Multiple '/' characters cannot occur in sequence.
> * A trailing '/' character is not allowed unless the path is the root path (a single '/' character).
>
> That means media players using URIs as track identifiers (for instance)
> will have to switch to something else
In Banshee, mpris:trackid is always typed as a string, both in
Metadata and in the SetPosition method :
void SetPosition (string trackid, long position)
But the value is constructed to follow the rules for object paths
outlined above : it's an object path with a unique id added at the
end.
So I guess switching to type 'o' everywhere should be easy.
--
Bertrand Lorentz
More information about the mpris
mailing list