Last active
December 11, 2015 00:59
-
-
Save jlewin/4520406 to your computer and use it in GitHub Desktop.
More Rdio History work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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