From f5e9f696b87279d7f1d314aa27886e0988701c8b Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 18 Dec 2019 16:38:10 +0100 Subject: [PATCH] Added more verbose mode for New Found Glory --- libs.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs.js b/libs.js index 1c5f0e7..a0e131d 100644 --- a/libs.js +++ b/libs.js @@ -32,6 +32,8 @@ const saveSong = (values, callback) => { last.length === 0 || (last[0] !== undefined && last[0].id !== values.id) ) { + console.log('[INFO][saveSong] song not found:', values.title, values.artist) + const history = new mongo.Histories(values) history.save(callback) } @@ -113,6 +115,8 @@ const findCover = (song, callback) => { if (metadata) { // On a déjà une pochette pour ce morceau if (metadata.cover) { + console.log('[INFO][findCover] cover exists:', metadata.cover) + callback(null, metadata.cover) return true } @@ -123,6 +127,7 @@ const findCover = (song, callback) => { callback(err) return false } + console.log('[INFO][findCover] cover does not exists but found on discogs:', coverUrl) metadata.updateOne({ cover: coverUrl }) callback(null, coverUrl) }) @@ -132,6 +137,7 @@ const findCover = (song, callback) => { callback(err) return false } + console.log('[INFO][findCover] cover does not exists but found on discogs (2):', coverUrl) song.cover = coverUrl const metadata = new mongo.Metadata(song) @@ -164,6 +170,7 @@ const getStream = (callback) => { } if (res !== null && res.artist !== undefined && res.title !== undefined) { + console.log('[INFO][getStream] CURRENT SONG:', res.title, res.artist) callback(null, res) } else { error = true