clear Speed and ETA columns for finished downloads

This commit is contained in:
Zlatin Balevsky
2019-12-16 14:22:12 +00:00
parent da3d7d7a50
commit 41a15fc7d5

View File

@ -10,10 +10,18 @@ class Downloader {
getMapping() {
var mapping = new Map()
var speed = this.speed
var ETA = this.ETA
var finished = (this.state == "FINISHED")
if (finished) {
speed = ""
ETA = ""
}
mapping.set("Name", this.getNameBlock())
mapping.set("State", this.state)
mapping.set("Speed", this.speed)
mapping.set("ETA", this.ETA)
mapping.set("Speed", speed)
mapping.set("ETA", ETA)
mapping.set("Progress", this.progress)
return mapping
}