Fixed bug for mysterious cover

This commit is contained in:
dbroqua 2019-12-23 17:38:02 +01:00
parent e9f43d47ea
commit 6564dec7a8

View file

@ -131,7 +131,7 @@ const findCover = (song, callback) => {
if (metadata) { if (metadata) {
// On a déjà une pochette pour ce morceau // On a déjà une pochette pour ce morceau
if (metadata.cover) { if (metadata.cover) {
console.log(config.colors.FgBlue, '[INFO][findCover] cover exists:', metadata.cover, config.colors.Reset) console.log(config.colors.FgBlue, '[INFO][findCover] cover exists:', metadata._id, metadata.cover, config.colors.Reset)
callback(null, metadata.cover) callback(null, metadata.cover)
return true return true
@ -180,7 +180,7 @@ const getStream = (callback) => {
title: _body.data[0].track.title, title: _body.data[0].track.title,
album: _body.data[0].track.album, album: _body.data[0].track.album,
royaltytrackid: _body.data[0].track.royaltytrackid, royaltytrackid: _body.data[0].track.royaltytrackid,
id: _body.data[0].track.id, id: _body.data[0].track.id || `FAKEID_${_body.data[0].track.artist}_${_body.data[0].track.title}_${_body.data[0].track.album}`,
playlistId: _body.data[0].track.playlist ? _body.data[0].track.playlist.id : null, playlistId: _body.data[0].track.playlist ? _body.data[0].track.playlist.id : null,
thumbCover: _body.data[0].track.imageurl thumbCover: _body.data[0].track.imageurl
} }