This commit is contained in:
MaysWind 2016-06-26 19:52:14 +08:00
parent 9c1d3b72f3
commit b529695bde

View file

@ -64,7 +64,7 @@
task.remainLength = task.totalLength - task.completedLength; task.remainLength = task.totalLength - task.completedLength;
task.remainPercent = 100 - task.completePercent; task.remainPercent = 100 - task.completePercent;
task.uploadLength = (task.uploadLength ? parseInt(task.uploadLength) : 0); task.uploadLength = (task.uploadLength ? parseInt(task.uploadLength) : 0);
task.shareRatio = (task.uploadLength / task.completedLength); task.shareRatio = (task.completedLength > 0 ? task.uploadLength / task.completedLength : 0);
task.uploadSpeed = parseInt(task.uploadSpeed); task.uploadSpeed = parseInt(task.uploadSpeed);
task.downloadSpeed = parseInt(task.downloadSpeed); task.downloadSpeed = parseInt(task.downloadSpeed);