- Go to https://yearinmusic.spotify.com/sv-SE
- Click "Se ditt year in music"
- When you see your first played track, open the developer console (command + alt + i) and paste this snippet:
var what = 'first-track-played my-top-artists my-top-albums my-top-tracks my-top-genres my-listening-minutes my-listening-artists my-listening-tracks'.split(' ');
var data = {};
var s=document.createElement('script'); s.src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js';
var done = function() {
var res = "My Year in Music\n" + data.my_listening_minutes.total_hours + ' hours (+' + data.my_listening_minutes.more_pct + "%)\n" + data.my_listening_tracks.total_tracks + ' songs (+' + data.my_listening_tracks.more_tracks + ') by ' + data.my_listening_artists.total_artists + ' artists (+' + data.my_listening_artists.more_artists + ")\n";
res += "*Top Tracks:*\n" + data.my_top_tracks.top5.map(function(t) { return ' ' + t.rank + '. ' + t.artist + ' - ' + t.song_title + "\n"; }).join("");
res += "*Top Albums:*\n" + data.my_top_albums.top5.map(function(t) { return ' ' + t.rank + '. ' + t.artist_name + ' - ' + t.album_name + "\n"; }).join("");
res += "*Top Artists:*\n" + data.my_top_artists.top5.map(function(t) { return ' ' + t.rank + '. ' + t.artist_name + ' (' + t.song_title + ")\n"; }).join("");
console.log(res);
};
s.onload=function() {
var next = function(index) {
var w;
if (!(w = what[index])) {
return done();
}
jQuery.getJSON('https://yearinmusic.spotify.com/api/app/year-in-music/sv-SE/' + w + '/').done(function(json) {
data[json.id.replace(/-/g, '_')] = json.model;
next(index+1);
});
};
next(0);
};
document.body.appendChild(s);
The code will output a summary of your year in music in textual form.