Implemented fluent download bars

This commit is contained in:
RemixDev 2020-04-11 00:21:30 +02:00
parent 2671681ec8
commit 1886e1b3a8
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,6 @@ socket.on("updateQueue", function(update){
if (update.downloaded){ if (update.downloaded){
queueList[update.uuid].downloaded++ queueList[update.uuid].downloaded++
$("#download_"+update.uuid+" .queue_downloaded").text(queueList[update.uuid].downloaded) $("#download_"+update.uuid+" .queue_downloaded").text(queueList[update.uuid].downloaded)
$('#bar_' + update.uuid).css('width', ((queueList[update.uuid].downloaded + queueList[update.uuid].failed) / queueList[update.uuid].size)*100 + '%')
} }
if (update.failed){ if (update.failed){
queueList[update.uuid].failed++ queueList[update.uuid].failed++
@ -42,6 +41,7 @@ socket.on("updateQueue", function(update){
} }
if (update.progress){ if (update.progress){
queueList[update.uuid].progress = update.progress queueList[update.uuid].progress = update.progress
$('#bar_' + update.uuid).css('width', update.progress + '%')
} }
} }
}) })