More bluebird, fetch larger artwork

This commit is contained in:
Jonathan Cremin 2014-12-13 12:05:47 +00:00
parent e671b823e9
commit 23896f7ee6
16 changed files with 117 additions and 81 deletions

View file

@ -33,7 +33,10 @@ module.exports.lookupId = function(id, type) {
name: data.name,
streamUrl: "https://play.spotify.com/" + type + "/" + data.id,
purchaseUrl: null,
artwork: data.images ? data.images[1].url.replace("http:", "https:") : data.album.images[1].url.replace("http:", "https:"),
artwork: {
small: data.images[1].url.replace("http:", "https:"),
large: data.images[0].url.replace("http:", "https:"),
},
artist: {
name: artist.name
}
@ -46,7 +49,10 @@ module.exports.lookupId = function(id, type) {
name: data.name,
streamUrl: "https://play.spotify.com/" + type + "/" + data.id,
purchaseUrl: null,
artwork: data.images ? data.images[1].url.replace("http:", "https:") : data.album.images[1].url.replace("http:", "https:"),
artwork: {
small: data.album.images[1].url.replace("http:", "https:"),
large: data.album.images[0].url.replace("http:", "https:"),
},
artist: {
name: artist.name
},