Added fallback for spotify conversion
authorRemixDev <deezloaderremix@gmail.com>
Mon, 4 Feb 2019 20:05:50 +0000 (21:05 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Mon, 4 Feb 2019 20:05:50 +0000 (21:05 +0100)
app/app.js

index 0480b334b8611595f40bc0e6510b5686e8c0e48b..a45447c815efa277590ab7466a50a85effc8561d 100644 (file)
@@ -599,6 +599,7 @@ io.sockets.on('connection', function (s) {
        // It tries first with the isrc (best way of conversion)
        // Fallbacks to the old way, using search
        async function convertSpotify2Deezer(track){
+               if (!track) return 0
                try{
                        if (track.external_ids.isrc){
                                let resp = await s.Deezer.legacyGetTrackByISRC(track.external_ids.isrc)