Handle non-album/track ids in GPM, 404 xbox
This commit is contained in:
parent
b3ca20570e
commit
15712f9482
4 changed files with 14 additions and 3 deletions
|
@ -72,6 +72,8 @@ module.exports.lookupId = function(id, type) {
|
|||
var path = "/" + id + "/lookup";
|
||||
return request.get(apiRoot + path).set("Authorization", "Bearer " + access_token).promise().then(function(res) {
|
||||
return formatResponse(res);
|
||||
}, function(res) {
|
||||
return {service: "xbox"};
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -92,6 +94,8 @@ module.exports.search = function(data) {
|
|||
var path = "/music/search?q=" + encodeURIComponent(query) + "&filters=" + type + "s";
|
||||
return request.get(apiRoot + path).set("Authorization", "Bearer " + access_token).promise().then(function(res) {
|
||||
return formatResponse(res);
|
||||
}, function(res) {
|
||||
return {service: "xbox"};
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue