Fixed bugs for KOЯN and Rx3
This commit is contained in:
parent
b8d9c1f28d
commit
3f25702e8e
1 changed files with 13 additions and 0 deletions
13
libs.js
13
libs.js
|
@ -64,6 +64,11 @@ const getLastSong = (callback) => {
|
|||
* @param {Function} callback
|
||||
*/
|
||||
const getRemoteCover = (song, callback) => {
|
||||
// Si c'est KOЯN on remplace par KORN (merci discogs)
|
||||
if (song.artist === 'KOЯN') {
|
||||
song.artist = 'KORN'
|
||||
}
|
||||
|
||||
dis.search({ q: song.album, artist: song.artist, page: 1, per_page: 1 }, (err, res) => {
|
||||
if (err) {
|
||||
console.log('ERR:', err)
|
||||
|
@ -86,6 +91,14 @@ const getRemoteCover = (song, callback) => {
|
|||
* @param {Function} callback
|
||||
*/
|
||||
const findCover = (song, callback) => {
|
||||
// Si c'est Rx3 on ne met pas de cover
|
||||
if (song.artist === 'Rx3') {
|
||||
const metadata = new mongo.Metadata(song)
|
||||
metadata.save()
|
||||
callback(null, null)
|
||||
return true
|
||||
}
|
||||
|
||||
mongo.Metadata.findOne({
|
||||
id: song.id
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue