Media Identifiers

From LinuxMCE
Revision as of 22:34, 17 May 2010 by Marie.o (Talk | contribs) (beautification plus link to media_plugin details)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Whenever media is detected, the Media_Plugin will send an "Identify Media" command to all devices with the category "Media Identifier" on the same computer as the drive that detected the media. The device must respond by filling in the out parameter "ID" with an XML document describing the media.

The XML file must have the following tags:

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<Filename>X</Filename> <Picture format="jpg">X</Picture> <PK_AttributeType="X">Value of attribute</PK_Attribute>
<PK_AttributeType="X">Value of attribute</PK_Attribute>
</Item> </Possibility></p> </xml>

If the device has only detected 1 possible match for the media, "Possibility" is an optional tag. Otherwise, X should be a ranking of 0-10 on the likelihood of a positive match, where 10 is a definite match--don't even ask the user--and 0 is a generic match to be used only if there no other matches. All other possible matches will be presented to the user with the highest ranked (ie 9) listed first. Description is a short description for the user.

Each of the attributes, as defined in the Attribute table in pluto_media, is listed, where X is the ID of the attribute. Item tags represent the individual tracks or chapters, where X is the numeric ID, like 1, 2, 3 for tracks 1, 2 and 3. When the user wants to jump to a particular item the Jump to Position in Playlist command will be sent with the ID.

PK_AttributeType tags within an Item tag are associated with the item, those outside an Item tag with the disc. The Filename and Picture tags are optional. If a filename tag exists within an Item tag, then the Item, if saved, will be saved under that filename. This is useful for tracks in a CD. If a Filename tag is specified outside an item tag, then the entire disc will be saved under that file, such as a DVD. Picture tags can be within the tags Possibility, Filename, or Item. The picture will be associated with whatever tag it is within. The contents of the picture, ie X, should be the picture UUencoded.