From 38326d7e93ff14749ca81ecfad931c5d19b0cea2 Mon Sep 17 00:00:00 2001 From: hamza zia Date: Wed, 28 Oct 2015 04:07:49 +0800 Subject: [PATCH] fixed bugs and added download/upload speed titles --- js/services/rpc/helpers.js | 2 +- js/services/utils.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/services/rpc/helpers.js b/js/services/rpc/helpers.js index b4ee00f..73e0663 100644 --- a/js/services/rpc/helpers.js +++ b/js/services/rpc/helpers.js @@ -13,7 +13,7 @@ angular.module('webui.services.rpc.helpers', [ }, addUris: function(uris, settings, cb) { _.each(uris, function(uri) { - uri_parsed = []; + var uri_parsed = []; // parse options passed in the URIs. E.g. http://ex1.com/f1.jpg --out=image.jpg --check-integrity var uriSettings = _.cloneDeep(settings); _.each(uri, function(uri_element) { diff --git a/js/services/utils.js b/js/services/utils.js index ac82c6b..e7d81d0 100644 --- a/js/services/utils.js +++ b/js/services/utils.js @@ -124,6 +124,8 @@ angular.module('webui.services.utils', ['webui.services.configuration']) return $titlePattern .replace('{active}', stats.numActive || '⌛') .replace('{waiting}', stats.numWaiting || '⌛') + .replace('{download_speed}', utils.fmtspeed(stats.downloadSpeed) || '⌛') + .replace('{upload_speed}', utils.fmtspeed(stats.uploadSpeed) || '⌛') .replace('{stopped}', stats.numStopped || '⌛') .replace('{name}', $name); },