Skip to content

Instantly share code, notes, and snippets.

@imlucas
Created October 5, 2009 01:03
Show Gist options
  • Select an option

  • Save imlucas/201732 to your computer and use it in GitHub Desktop.

Select an option

Save imlucas/201732 to your computer and use it in GitHub Desktop.
/**
* Get a XSPF playlist as a JSON object
*/
var getUrl = 'http://hideout.com.br/shows/hideout-41.xspf';
$.getJSON('http://pipes.yahoo.com/pipes/pipe.run?_callback=?&_render=json&_id=095dfddb83b72f96b9271cbabf2808e0&playlist_url='+encodeURIComponent(getUrl), function(d){
var items = d.value.items;
var playlist = [];
$.each(items, function(){
var item = this;
item.id = this.location;
playlist.push(item);
});
console.debug(playlist);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment