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

@ -32,7 +32,10 @@ module.exports.lookupId = function(id, type) {
}
var cover = result.cover || result.album.cover;
return request.get(cover).redirects(0).promise().then(function(res) {
var artwork = res.headers.location.replace("120x120", "200x200");
var artwork = {
small: res.headers.location.replace("120x120", "200x200"),
large: res.headers.location.replace("120x120", "800x800")
};
if (type == "album") {
return {
service: "deezer",