Added more verbose for errors
This commit is contained in:
parent
2617a4ed19
commit
19588c67d6
3 changed files with 11 additions and 5 deletions
8
index.js
8
index.js
|
@ -1,5 +1,5 @@
|
|||
const moment = require('moment')
|
||||
const libs = require('./libs')
|
||||
|
||||
const config = require('./config')
|
||||
|
||||
setInterval(() => {
|
||||
|
@ -9,7 +9,7 @@ setInterval(() => {
|
|||
// On récupére en base le précédent morceau joué
|
||||
libs.getLastSong((err, last) => {
|
||||
if (err) {
|
||||
console.log(err)
|
||||
console.log('[ERR] GET LAST SONG:', moment().format(), err)
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -20,14 +20,14 @@ setInterval(() => {
|
|||
// On sauvegarde en base le morceau en cours de diffusion
|
||||
libs.saveSong(currentSong, (err, savedSond) => {
|
||||
if (err) {
|
||||
console.log('ERR:', err)
|
||||
console.log('[ERR] SAVE SONG:', moment().format(), err)
|
||||
return false
|
||||
}
|
||||
|
||||
// On récupère la cover du morceau actuel
|
||||
libs.findCover(currentSong, (err, coverUrl) => {
|
||||
if (err) {
|
||||
console.log('ERR:', err)
|
||||
console.log('[ERR] FIND COVER:', moment().format(), err)
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"dependencies": {
|
||||
"disconnect": "^1.2.1",
|
||||
"mastodon": "^1.2.2",
|
||||
"moment": "^2.24.0",
|
||||
"mongoose": "^5.7.13",
|
||||
"request": "^2.88.0"
|
||||
},
|
||||
|
@ -20,4 +21,4 @@
|
|||
"eslint-plugin-standard": "^4.0.1",
|
||||
"nodemon": "^2.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1280,6 +1280,11 @@ mkdirp@^0.5.1:
|
|||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
moment@^2.24.0:
|
||||
version "2.24.0"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
|
||||
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
|
||||
|
||||
mongodb@3.3.5:
|
||||
version "3.3.5"
|
||||
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.3.5.tgz#38d531013afede92b0dd282e3b9f3c08c9bdff3b"
|
||||
|
|
Loading…
Reference in a new issue