MPRIS v2 metadata guidelines

It is recommended that xesam metadata fields (prefixed by "xesam:") are used wherever possible. This allows for natural extension of the specification in a standard way.

There are also a few MPRIS-specific fields that are intended for interaction with other methods in the specification. These are prefixed with "mpris:".

Any metadata fields that are not part of a xesam ontology or defined in this document should be prefixed with a different tag, such as "totem:" or "kde:".

Types

List of Strings

Note that some types that you might expect to be strings are, in fact, "lists of strings". These should be sent using the "as" D-Bus type (array of string).

Date/Time

Date/time fields should be sent as strings in ISO 8601 extended format. If the timezone is known (eg: for xesam:lastPlayed), the internet profile format of ISO 8601, as specified in RFC 3339, should be used.

For example: "2007-04-29T13:56+01:00" for 29th April 2007, four minutes to 2pm, in a time zone 1 hour ahead of UTC.

URI

URIs should be sent as (UTF-8) strings. Local files should use the "file://" schema.

Fields

MPRIS-specific

mpris:trackid

D-Bus path: A unique identity for this track within the context of an MPRIS object (eg: tracklist).

mpris:length

64-bit integer: The duration of the track in microseconds.

mpris:artUrl

URI: The location of an image representing the track or album. Clients should not assume this will continue to exist when the media player stops giving out the URL.

Common Xesam properties

Common audio properties from the Xesam specification:

xesam:album

String: The album name.

xesam:albumArtist

List of Strings: The album artist(s).

xesam:artist

List of Strings: The track artist(s).

xesam:asText

String: The track lyrics.

xesam:audioBPM

Integer: The speed of the music, in beats per minute.

xesam:autoRating

Float: An automatically-generated rating, based on things such as how often it has been played. This should be in the range 0.0 to 1.0.

xesam:comment

List of Strings: A (list of) freeform comment(s).

xesam:composer

List of Strings: The composer(s) of the track.

xesam:contentCreated

Date/Time: When the track was created. Usually only the year component will be useful.

xesam:discNumber

Integer: The disc number on the album that this track is from.

xesam:firstUsed

Date/Time: When the track was first played.

xesam:genre

List of Strings: The genre(s) of the track.

xesam:lastUsed

Date/Time: When the track was last played.

xesam:lyricist

List of Strings: The lyricist(s) of the track.

xesam:title

String: The track title.

xesam:trackNumber

Integer: The track number on the album disc.

xesam:url

URI: The location of the media file.

xesam:useCount

Integer: The number of times the track has been played.

xesam:userRating

Float: A user-specified rating. This should be in the range 0.0 to 1.0.