Made download cancelling process more clear

This commit is contained in:
RemixDev 2020-04-14 19:14:17 +02:00
parent 92be2a120e
commit a3c9d06e14

View File

@ -110,11 +110,22 @@ socket.on("finishDownload", function(uuid){
} }
}) })
socket.on("removedAllDownloads", function(){ socket.on("removedAllDownloads", function(currentItem){
queue = []
queueList = {}
queueComplete = [] queueComplete = []
$("#download_list").html("") if (currentItem == ""){
queue = []
queueList = {}
$("#download_list").html("")
}else{
queue = [currentItem, ]
tempQueueItem = queueList[currentItem]
queueList = {}
queueList[currentItem] = tempQueueItem
$(".download_object").each(function(index){
if ($(this).attr('id') != "download_"+currentItem)
$(this).remove()
})
}
}) })
socket.on("removedFinishedDownloads", function(){ socket.on("removedFinishedDownloads", function(){