From 97f682a02237b33fb6119b6a4dbd2dda5c9c43d4 Mon Sep 17 00:00:00 2001 From: CyTube Date: Fri, 28 Feb 2014 06:47:06 +0100 Subject: [PATCH] Emergency fix --- lib/channel.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/channel.js b/lib/channel.js index 5ffd78a4..9337c062 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -1814,19 +1814,19 @@ Channel.prototype.handleQueuePlaylist = function (user, data) { } } - for (var i = 0; i < pl.length; i++) { - pl[i].pos = pos; - pl[i].temp = temp; - pl[i].queueby = user.name; - self.addMedia(pl[i], function (err, media) { + pl.forEach(function (pli) { + pli.pos = pos; + pli.temp = temp; + pli.queueby = user.name; + self.addMedia(pli, function (err, media) { if (err) { user.socket.emit("queueFail", { msg: err, - link: util.formatLink(pl[i].id, pl[i].type) + link: util.formatLink(pli.id, pli.type) }); } }); - } + }); } catch (e) { Logger.errlog.log("Loading user playlist failed!"); Logger.errlog.log("PL: " + user.name + "-" + name);