Skip to content

Instantly share code, notes, and snippets.

@jlewin
Last active December 11, 2015 00:59
Show Gist options
  • Save jlewin/4520406 to your computer and use it in GitHub Desktop.
Save jlewin/4520406 to your computer and use it in GitHub Desktop.
More Rdio History work
var allResults = [ /* get json from fiddler requests */];
for (var a = 0; a < 3; a++) {
var sources = allResults[a].result.sources;
//console.log(sources);
console.log('---------------------------------')
for (var i = 0; i < sources.length; i++) {
var item = sources[i];
console.log();
console.log(item.source.artist ? item.source.artist : 'Playlist', '-', item.source.name);
var tracks = item.tracks.items;
for (var j = tracks.length - 1; j >= 0; j--) {
var t = tracks[j];
var time = t.time;
var d = time.substr(5, 2) + '/' + time.substr(8, 2);
var tx = time.substr(11);
console.log(' - ' + d + ' ' + tx, t.track.name);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment