Commit 182439fa authored by mercury233's avatar mercury233

fix download progress

parent 14ab6ac3
Pipeline #12471 failed with stages
in 3 minutes and 31 seconds
......@@ -54,11 +54,10 @@ export class DownloadStatus {
status.errorCode = o.errorCode;
status.errorMessage = o.errorMessage;
}
status.downloadSpeed += o.downloadSpeed;
status.totalLength += o.totalLength;
status.completedLength += o.completedLength;
}
status.downloadSpeed += o.downloadSpeed;
status.totalLength += o.totalLength;
status.completedLength += o.completedLength;
}
return status;
}
......@@ -79,7 +78,7 @@ export class DownloadStatus {
if (item) {
this.completedLength = parseInt(item.completedLength) || 0;
this.downloadSpeed = parseInt(item.downloadSpeed) || 0;
this.totalLength = parseInt(item.totalLength) || 0;
this.totalLength = parseInt(item.totalLength) || parseInt(item.files[0].length) || 0;
this.gid = item.gid;
this.status = item.status;
this.errorCode = item.errorCode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment