Added top albums images on last.fm page

This commit is contained in:
Sahat Yalkabov
2013-12-10 00:36:52 -05:00
parent b72599151a
commit 2a9901d2c2
2 changed files with 4 additions and 5 deletions

View File

@ -213,7 +213,7 @@ exports.getLastfm = function(req, res) {
_.each(data.topalbums.album, function(album) {
albums.push(album.image.slice(-1)[0]['#text']);
});
done(null, albums);
done(null, albums.slice(0,4));
},
error: function(error) {
done(error);
@ -224,9 +224,6 @@ exports.getLastfm = function(req, res) {
},
function(err, results) {
if (err) return res.send(err);
console.log('===')
console.log(err);
console.log(results);
var artist = {
name: results.artistInfo.artist.name,
image: results.artistInfo.artist.image.slice(-1)[0]['#text'],

View File

@ -28,6 +28,7 @@ block content
small.text-primary
i.fa.fa-headphones
| Scrobbles: #{artist.stats.playcount}
p
img(src='#{artist.image}')
@ -45,7 +46,8 @@ block content
h4 Top Albums
for album in artist.topAlbums
album
img(src='#{album}', width=150, height=150)
| 
h4 Similar Artists
ul.list