Intelligently split link lists to allow URLs with commas

This commit is contained in:
calzoneman 2015-08-19 23:27:05 -07:00
parent 26eb3502be
commit de02cdbeff
1 changed files with 9 additions and 1 deletions

View File

@ -344,7 +344,15 @@ function queue(pos, src) {
temp: $(".add-temp").prop("checked")
});
} else {
var links = $("#mediaurl").val().split(",");
var linkList = $("#mediaurl").val();
var links = linkList.split(",http").map(function (link, i) {
if (i > 0) {
return "http" + link;
} else {
return link;
}
});
if (pos === "next") links = links.reverse();
if (pos === "next" && $("#queue li").length === 0) links.unshift(links.pop());
var emitQueue = [];