diff --git a/server/handlers/list.js b/server/handlers/list.js index 1bc38a75..c05c2d3d 100644 --- a/server/handlers/list.js +++ b/server/handlers/list.js @@ -271,7 +271,7 @@ function change_song(coll, error, id, conf, callback, socket) { $limit:2 }], function(err, now_playing_doc){ if((id && id == now_playing_doc[0].id) || !id) { - if(error){ + if(error && now_playing_doc[0].source == "youtube"){ request('http://img.youtube.com/vi/'+now_playing_doc[0].id+'/mqdefault.jpg', function (err, response, body) { if (err || response.statusCode == 404) { db.collection(coll).remove({now_playing:true, id:id}, function(err, docs){ diff --git a/server/public/assets/js/player.js b/server/public/assets/js/player.js index 6f4af50d..b629c364 100755 --- a/server/public/assets/js/player.js +++ b/server/public/assets/js/player.js @@ -347,6 +347,12 @@ var Player = { }).catch(function(e){ }); } + }).catch(function(error) { + curr_playing = id; + emit("skip", {error: 5, id: id, channel: chan.toLowerCase()}); + setTimeout(function() { + toast("Seems the SoundCloud-API rate-limit has been reached..", "red lighten"); + }, 1000); }); } else { try {