Skip to content

Instantly share code, notes, and snippets.

@spadgos
Created February 2, 2013 12:24
Show Gist options
  • Save spadgos/4697069 to your computer and use it in GitHub Desktop.
Save spadgos/4697069 to your computer and use it in GitHub Desktop.
Get your SoundCloud likes as a .pls file (Paste this in the console on soundcloud.com)
$.getJSON('e1/me/track_likes.json?limit=200').done(function (likes) {
var list = likes.map(function (like, i) {
i++;
var sound = like.track;
return [
'File' + i + '=' + sound.stream_url + "?client_id=" + require('config').get('client_id'),
'Title' + i + '=' + sound.title,
'Length' + i + '=' + Math.round(sound.duration / 1000)
].join('\n');
}).join('\n\n');
console.log([
'[playlist]',
'NumberOfEntries=' + likes.length,
list,
'version=2'
].join('\n'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment