Allow comma-separated URLs in queue box

This commit is contained in:
calzoneman 2013-04-12 13:02:57 -05:00
parent d5ce1020b2
commit 4e2702f65f

View file

@ -125,7 +125,11 @@ setInterval(function() {
}, 5000); }, 5000);
$("#queue_end").click(function() { $("#queue_end").click(function() {
var parsed = parseVideoURL($("#mediaurl").val()); var urls = $("#mediaurl").val().split(",");
for(var i = 0; i < urls.length; i++) {
if(!urls[i].trim())
continue;
var parsed = parseVideoURL(urls[i].trim());
var id = parsed[0]; var id = parsed[0];
var type = parsed[1]; var type = parsed[1];
if(id) { if(id) {
@ -136,10 +140,15 @@ $("#queue_end").click(function() {
pos: "end", pos: "end",
type: type type: type
}); });
}
}); });
$("#queue_next").click(function() { $("#queue_next").click(function() {
var parsed = parseVideoURL($("#mediaurl").val()); var urls = $("#mediaurl").val().split(",");
for(var i = 0; i < urls.length; i++) {
if(!urls[i].trim())
continue;
var parsed = parseVideoURL(urls[i].trim());
var id = parsed[0]; var id = parsed[0];
var type = parsed[1]; var type = parsed[1];
if(id) { if(id) {
@ -150,6 +159,7 @@ $("#queue_next").click(function() {
pos: "next", pos: "next",
type: type type: type
}); });
}
}); });
$("#play_next").click(function() { $("#play_next").click(function() {