From 8b06f72a9450e1ea8b6c525c0da0b168d1c6237d Mon Sep 17 00:00:00 2001 From: ngosang Date: Sun, 17 May 2015 15:47:37 +0200 Subject: [PATCH] Web UI: Fix Max connections and Time active in transfer information --- src/webui/www/public/scripts/prop-general.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/webui/www/public/scripts/prop-general.js b/src/webui/www/public/scripts/prop-general.js index 52a27b3a8..5679be1cc 100644 --- a/src/webui/www/public/scripts/prop-general.js +++ b/src/webui/www/public/scripts/prop-general.js @@ -63,11 +63,10 @@ var loadTorrentData = function() { $('up_limit').set('html', temp == -1 ? "∞" : temp); temp = data.dl_limit; $('dl_limit').set('html', temp == -1 ? "∞" : temp); - temp = friendlyDuration(status.active_time); - if (status.is_seed) - temp += " (" + "QBT_TR(Seeded for %1)QBT_TR".replace("%1", status.seeding_time) + ")"; + temp = friendlyDuration(data.time_elapsed) + + " (" + "QBT_TR(Seeded for %1)QBT_TR".replace("%1", friendlyDuration(data.seeding_time)) + ")"; $('time_elapsed').set('html', temp); - temp = data.nb_connections + " (" + "QBT_TR(%1 max)QBT_TR".replace("%1", status.nb_connections_limit) + ")"; + temp = data.nb_connections + " (" + "QBT_TR(%1 max)QBT_TR".replace("%1", data.nb_connections_limit) + ")"; $('nb_connections').set('html', temp); $('share_ratio').set('html', data.share_ratio.toFixed(2)); } @@ -83,4 +82,4 @@ var loadTorrentData = function() { var updateTorrentData = function() { clearTimeout(loadTorrentDataTimer); loadTorrentData(); -} \ No newline at end of file +}