diff --git a/channel.js b/channel.js index 60ba88fd..e81b2787 100644 --- a/channel.js +++ b/channel.js @@ -1192,6 +1192,8 @@ Channel.prototype.tryQueue = function(user, data) { return; } + data.queueby = user ? user.name : ""; + if(data.list) this.addMediaList(data, user); else @@ -1200,7 +1202,6 @@ Channel.prototype.tryQueue = function(user, data) { Channel.prototype.addMedia = function(data, user) { data.temp = isLive(data.type) || !this.hasPermission(user, "addnontemp"); - data.queueby = user ? user.name : ""; data.maxlength = this.hasPermission(user, "exceedmaxlength") ? 0 : this.opts.maxlength; var chan = this; if(data.id in this.library) { @@ -1294,6 +1295,7 @@ Channel.prototype.tryQueuePlaylist = function(user, data) { var pl = Database.loadUserPlaylist(user.name, data.name); data.list = pl; + data.queueby = user.name; this.addMediaList(data, user); } diff --git a/playlist.js b/playlist.js index bd752d3e..155d3dd0 100644 --- a/playlist.js +++ b/playlist.js @@ -249,8 +249,12 @@ Playlist.prototype.addMediaList = function(data, callback) { start = data.list[data.list.length - 1]; } + if(this.items.length != 0) + start = false; + var pl = this; data.list.forEach(function(x) { + x.queueby = data.queueby; x.pos = data.pos; if(start && x == start) { pl.addMedia(x, function (err, item) {