Fix queueby on user playlists
This commit is contained in:
parent
68146043ad
commit
31564b97fd
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue