From 6564dec7a84e1adf03ee393febd3f575dd05be15 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 23 Dec 2019 17:38:02 +0100 Subject: [PATCH] Fixed bug for mysterious cover --- libs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs.js b/libs.js index 53d2901..9c90e7a 100644 --- a/libs.js +++ b/libs.js @@ -131,7 +131,7 @@ const findCover = (song, callback) => { if (metadata) { // On a déjà une pochette pour ce morceau 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) return true @@ -180,7 +180,7 @@ const getStream = (callback) => { title: _body.data[0].track.title, album: _body.data[0].track.album, 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, thumbCover: _body.data[0].track.imageurl }