[Playlist] xspf resolver

Paul Lamere Paul.Lamere at sun.com
Tue Nov 21 00:52:11 UTC 2006


Lucas:

No limits on what I can say about this.  The current version is pretty 
simple:

    * Read and parse the XSPF (it must be valid xml)
    * For each track, if the field exists get the
          o track title
          o track creator
          o track album
          o Make a query to musicBrainz of the form
            http://musicbrainz.org/ws/1/track?type=xml&title=buddy+holly&artist=weezer&release=Weezer
            (of course, omitting any missing fields)
          o Get the result list - which contains an ordered list of the
            best matches -  I take the best match (regardless of the
            score) as the proper match
          o Extract out the track, artist, album and musicbrainz ID from
            the musicbrainz DOM
          o Insert (or replace) the proper field in the XSPF DOM, as
            well as a comment to indicate which fields have been added
            or change
    * Output the updated XSPF

As you can see, the hard work is all done by musicbrainz - Robert's 
nifty fuzzy match is key.




More information about the Playlist mailing list