[mpris] TrackList interface

Alex Merry kde at randomguy3.me.uk
Wed Nov 23 13:31:21 CET 2011


On 18/11/11 04:14, mirsal wrote:
> On Wed, 2011-11-16 at 13:50 +0000, Alex Merry wrote:
>> The two reasonable options here (as I see it) are:
>> 1) the returned list exactly matches the sent list, in the same order,
>> with empty a{sv} entries for invalid track ids
>> 2) the returned list only contains entries for valid track ids, (in
>> arbitrary order?), and it is up to the client to figure out which
>> metadata map corresponds to which track (based on the mpris:trackid
>> property)
>
> Both of them sound equally sensible to me.
>
> VLC behaves as option 2 (invalid track IDs are simply discarded) and
> option 1 would only require only a one-line change.

I'm torn here.  Option 1 places less processing burden on clients, and 
shouldn't be that much harder for media players.  However, Option 2 
allows media players greater flexibility, both in not sending crazy 
large messages to misbehaving clients that, say, fill the request array 
with lots of copies of the same track id, and in matching the order up 
to whatever is most convenient for their internal data structures.

Also, it's more likely that media players would fail to implement option 
1 correctly, which could be an issue for clients (who would have to 
behave as though we'd gone for option 2 if they wanted to support such a 
broken media player).

Alex


More information about the mpris mailing list