mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-14 17:13:05 -04:00
[search](audio) fix song url lookup response
This commit is contained in:
parent
e2f69b14c1
commit
25baa7df4b
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@ module.exports = {
|
||||||
if(urls){
|
if(urls){
|
||||||
try{
|
try{
|
||||||
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links?url=${encodeURIComponent(urls[0])}`)
|
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links?url=${encodeURIComponent(urls[0])}`)
|
||||||
|
console.log(songlink.body)
|
||||||
let song = songlink.body.entitiesByUniqueId[songlink.body.entityUniqueId]
|
let song = songlink.body.entitiesByUniqueId[songlink.body.entityUniqueId]
|
||||||
|
|
||||||
let btns = renderMusicButtons(songlink.body.linksByPlatform)
|
let btns = renderMusicButtons(songlink.body.linksByPlatform)
|
||||||
|
@ -43,7 +44,7 @@ module.exports = {
|
||||||
author: {
|
author: {
|
||||||
name: `${song.title} by ${song.artistName}`.substr(0,1000),
|
name: `${song.title} by ${song.artistName}`.substr(0,1000),
|
||||||
iconUrl: song.thumbnailUrl,
|
iconUrl: song.thumbnailUrl,
|
||||||
url: url
|
url: urls[0]
|
||||||
},
|
},
|
||||||
footer: {}
|
footer: {}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue