Implemented Search Fallback
authorRemixDev <deezloaderremix@gmail.com>
Tue, 4 Jun 2019 08:58:29 +0000 (10:58 +0200)
committerRemixDev <deezloaderremix@gmail.com>
Tue, 4 Jun 2019 08:58:29 +0000 (10:58 +0200)
app/app.js

index 80c6db3da1ef67fceb182cf9c73e733ea56da226..10aa916eebc8d2265f88d57e7891fc24ecce2492 100644 (file)
@@ -1374,7 +1374,7 @@ io.sockets.on('connection', function (s) {
                                                        logger.warn(`[${track.artist.name} - ${track.title}] Failed to download track, falling on alternative`)
                                                        track = await s.Deezer.getTrack(track.fallbackId)
                                                        return downloadTrackObject(track, queueId, settings)
-                                               }else if(!track.searched){
+                                               }else if(!track.searched && settings.fallbackSearch){
                                                        logger.warn(`[${track.artist.name} - ${track.title}] Failed to download track, searching for alternative`)
                                                        var _trackID = await convertMetadata2Deezer(track.artist.name, track.title, track.album.title)
                                                        if (_trackID != "0"){
@@ -1838,7 +1838,7 @@ io.sockets.on('connection', function (s) {
                                        track.MD5 = _track.MD5
                                        track.mediaVersion = _track.mediaVersion
                                        return downloadTrackObject(track, queueId, settings)
-                               }else if(!track.searched){
+                               }else if(!track.searched && settings.fallbackSearch){
                                        logger.warn(`[${track.artist.name} - ${track.title}] Track is empty, searching for alternative`)
                                        _trackId = await convertMetadata2Deezer(track.artist.name, track.title, track.album.title)
                                        if (_trackId != "0"){