diff --git a/app/langs/zh_CN.json b/app/langs/zh_CN.json index 938ea17..b016c9f 100644 --- a/app/langs/zh_CN.json +++ b/app/langs/zh_CN.json @@ -44,6 +44,7 @@ "File Name": "文件名", "File Size": "大小", "Completed Percent": "进度", + "Share Ratio": "分享率", "Remain Time": "剩余时间", "Download Speed": "下载速度", "Upload Speed": "上传速度", diff --git a/app/scripts/config/language-default.js b/app/scripts/config/language-default.js index da5251c..d811b13 100644 --- a/app/scripts/config/language-default.js +++ b/app/scripts/config/language-default.js @@ -48,7 +48,8 @@ 'File Name': 'File Name', 'File Size': 'File Size', 'Completed Percent': 'Percent', - 'Remain Time': 'Remain', + 'Share Ratio': 'Share Ratio', + 'Remain Time': 'Remain Time', 'Download Speed': 'Download Speed', 'Upload Speed': 'Upload Speed', 'Overview': 'Overview', diff --git a/app/scripts/services/aria2TaskService.js b/app/scripts/services/aria2TaskService.js index c2d98f8..35c8f02 100644 --- a/app/scripts/services/aria2TaskService.js +++ b/app/scripts/services/aria2TaskService.js @@ -56,6 +56,8 @@ task.completePercent = (task.totalLength > 0 ? task.completedLength / task.totalLength * 100 : 0); task.remainLength = task.totalLength - task.completedLength; task.remainPercent = 100 - task.completePercent; + task.uploadLength = (task.uploadLength ? parseInt(task.uploadLength) : 0); + task.shareRatio = (task.uploadLength / task.completedLength); task.uploadSpeed = parseInt(task.uploadSpeed); task.downloadSpeed = parseInt(task.downloadSpeed); @@ -153,7 +155,7 @@ }, selectTaskFile: function (gid, selectedFileIndexArr, callback) { var selectedFileIndex = ''; - + for (var i = 0; i < selectedFileIndexArr.length; i++) { if (selectedFileIndex.length > 0) { selectedFileIndex += ','; @@ -161,7 +163,7 @@ selectedFileIndex += selectedFileIndexArr[i]; } - + return this.setTaskOption(gid, 'select-file', selectedFileIndex, callback); }, getBtTaskPeers: function (gid, callback, silent) { diff --git a/app/views/task-detail.html b/app/views/task-detail.html index e86212f..234d95c 100644 --- a/app/views/task-detail.html +++ b/app/views/task-detail.html @@ -80,6 +80,14 @@ +
+
+ Share Ratio +
+
+ +
+
Remain Time