I spent a bit of time yesterday writing a XSPF playlist resolver web service.  The playlist resolver will take a playlist in XSPF format and return a new playlist that has been augmented with a MusicBrainz identifier and has the various other fields adjusted to a canonical form. 

 Here's an example using a playlist from Oscar Celma:

 <playlist version="1" xmlns= "http://foafing-the-music.iua.upf.edu">
  <trackList>
    <track>
      <location>http://mtgdb.iua.upf.edu/total/audio/mp3/w/wilco/the_spongebob_squarepants_movie_/03-just_a_kid.mp3</location>
      <image>http://foafing-the-music.iua.upf.edu/services/AWS?display=image&amp;keywords=U2</image>
      <info>http://www.mp3.com/search.php?stype=artist&amp;query=U2&amp;action=Search</info>
      <title>With o without yu</title>
      <creator>U2</creator>
      <album>Josua tre</album>

</track>
</tracklist>
</playlist


And here's the same playlist after canonicalizing it:


<playlist xmlns="http://foafing-the-music.iua.upf.edu" version="1">
<trackList>
<track>
<location>http://mtgdb.iua.upf.edu/total/audio/mp3/w/wilco/the_spongebob_squarepants_movie_/03-just_a_kid.mp3</location>
<image>http://foafing-the-music.iua.upf.edu/services/AWS?display=image&amp;keywords=U2</image>
<info>http://www.mp3.com/search.php?stype=artist&amp;query=U2&amp;action=Search</info>
<creator>U2</creator>
<identifier>http://musicbrainz.org/track/6b9a509f-6907-4a6e-9345-2f12da09ba4b.html</identifier>
<title>With or Without You</title>
<album>The Joshua Tree</album>
</track>

</tracklist>
</playlist
>

 The key is the addition of the MusicBrainz identifier. This makes it easy to tie a track to all of the metadata that describes the track.  Lucas Gonze (of WebJay fame), writes more about it on his blog:  Content Resolver Mashup.


Comments:

without having read the specs (i know, it's a good way to start a question), what about track/album metadata in the playlist? wouldn't it be nice to have room for some sort of genre/style namespace, year of release or something else? or is this just to resolved through the identifier node and put somewhere else but not in the playlist ...

Posted by adrian on November 22, 2006 at 03:09 AM EST #

Adrian: Yes - the answer is in the spec. (and by the way, it is, as far as specs go, one of the easiest to read). Here's what the spec says about metadata: The function of a playlist is not to communicate metadata about the composer, song title, etc. Metadata is hard and there are many providers already. We decided that we couldn't compete, and that there was no need for us to try. Moreover, good metadata does not travel well — every user has to recreate it. Metadata should come from external sources and namespaces like MusicBrainz or Gracenote; this what the XSPF link and meta elements are for.

Posted by Paul on November 22, 2006 at 07:17 AM EST #

Post a Comment:
Comments are closed for this entry.

This blog copyright 2010 by plamere