Add Beats music support
This commit is contained in:
parent
f7a5291e17
commit
1a7896716f
9 changed files with 154 additions and 18 deletions
|
@ -92,13 +92,13 @@ module.exports.search = function(data, next) {
|
|||
var result = results.filter(function(result) {
|
||||
if (type == "album" && result.name == data.name) {
|
||||
return result;
|
||||
} else if (type == "track" && result.album.name == data.album) {
|
||||
} else if (type == "track" && result.album == data.album.name) {
|
||||
return result;
|
||||
}
|
||||
}).shift();
|
||||
console.log(result)
|
||||
|
||||
if (!result) {
|
||||
return next({});
|
||||
return next({service: "rdio"});
|
||||
}
|
||||
var parsed = parse(result.shortUrl)
|
||||
var id = parsed.path.replace("/x/", "").replace("/", "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue