Add tests for Beats
This commit is contained in:
parent
1a7896716f
commit
7cc68d1968
4 changed files with 62 additions and 1 deletions
|
@ -62,6 +62,10 @@ module.exports.search = function(data, next) {
|
|||
return a.score < b.score;
|
||||
}).shift();
|
||||
|
||||
if (!result.album && !result.track) {
|
||||
next({service:"googleplaymusic"});
|
||||
}
|
||||
|
||||
var id;
|
||||
if (type == "album") {
|
||||
id = result.album.albumId;
|
||||
|
|
|
@ -58,6 +58,10 @@ module.exports.search = function(data, next) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!data[type + "s"].items[0]) {
|
||||
next({service:"spotify"});
|
||||
}
|
||||
|
||||
var item = data[type + "s"].items[0];
|
||||
|
||||
module.exports.lookupId(item.id, type, next);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue