diff options
Diffstat (limited to 'module/web/static/default/home.js')
-rw-r--r-- | module/web/static/default/home.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/module/web/static/default/home.js b/module/web/static/default/home.js index 8a6586b33..0d74aa17a 100644 --- a/module/web/static/default/home.js +++ b/module/web/static/default/home.js @@ -96,13 +96,23 @@ function renderTable(data){ div.getChildren("b")[0].textContent = dl.name - size = Math.round((dl.size - dl.kbleft) / 1024) + "/" + Math.round(dl.size / 1024) + " MB" - div.getChildren(".dlsize")[0].textContent = size + if (dl.status == "downloading"){ - speed = Math.round(dl.speed) + " kb/s" - div.getChildren(".dlspeed")[0].textContent = speed + size = Math.round((dl.size - dl.kbleft) / 1024) + "/" + Math.round(dl.size / 1024) + " MB" + speed = Math.round(dl.speed) + " kb/s" + eta = dl.eta + + + }else if (dl.status == "waiting"){ - div.getChildren(".dltime")[0].textContent = dl.eta + size = "waiting "+ dl.wait + speed = "" + eta = "" + + } + div.getChildren(".dlsize")[0].textContent = size + div.getChildren(".dlspeed")[0].textContent = speed + div.getChildren(".dltime")[0].textContent = eta }else{ |