Skip to content

Commit

Permalink
add status of progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
eroamane authored May 22, 2020
1 parent 0f4cc7a commit 8e39b33
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/aria2.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,13 @@ if (typeof ARIA2=="undefined"||!ARIA2) var ARIA2=(function(){
result.progress = (result.completedLength * 1.0 / result.totalLength * 100).toFixed(2);
result.eta = (result.totalLength - result.completedLength)/result.downloadSpeed;

result.progressStatus = {
"active" : "progress-striped",
"complete": "progress-striped",
"removed" : "progress-warning",
"error" : "progress-danger"
}[result.status];

result.downloadSpeed = parseInt(result.downloadSpeed);
result.uploadSpeed = parseInt(result.uploadSpeed);
result.uploadLength = parseInt(result.uploadLength);
Expand Down

0 comments on commit 8e39b33

Please sign in to comment.