Fix comma separated queues

This commit is contained in:
calzoneman 2013-09-30 09:51:38 -05:00
parent 2fc8349daf
commit 0eda0b8ed2
2 changed files with 5 additions and 3 deletions

View file

@ -1343,6 +1343,11 @@ Channel.prototype.tryQueue = function(user, data) {
data.temp = !this.hasPermission(user, "addnontemp");
if (data.list) {
if (data.pos === "next") {
data.list.reverse();
if (this.playlist.items.length === 0)
data.list.unshift(data.list.pop());
}
for (var i = 0; i < data.list.length; i++) {
data.list[i].pos = data.pos;
this.tryQueue(user, data.list[i]);

View file

@ -323,9 +323,6 @@ function queue(pos) {
return;
}
var links = $("#mediaurl").val().split(",");
if(pos == "next") {
links = links.reverse();
}
var parsed = [];
links.forEach(function(link) {
var data = parseMediaLink(link);