From cad82b64d9224628cbd51afb63c673e2cccb3e88 Mon Sep 17 00:00:00 2001 From: Sebastian Jensen Date: Fri, 13 Jan 2017 17:48:14 +0100 Subject: [PATCH] ETA is now shown in compact view. --- web/javascript/torrent-row.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/javascript/torrent-row.js b/web/javascript/torrent-row.js index 54a6bc294..73b15aece 100644 --- a/web/javascript/torrent-row.js +++ b/web/javascript/torrent-row.js @@ -107,6 +107,14 @@ TorrentRendererHelper.formatDL = function (t) { return '↓ ' + Transmission.fmt.speedBps(t.getDownloadSpeed()); }; +TorrentRendererHelper.formatETA = function(t) { + var eta = t.getETA(); + if (eta < 0 || eta >= (999 * 60 * 60)) { + return ""; + }; + return "ETA: " + Transmission.fmt.timeInterval(eta); +}; + /**** ***** ***** @@ -328,6 +336,9 @@ TorrentRendererCompact.prototype = { return 'Idle'; }; var s = ''; + if (!isMobileDevice) { + s = TorrentRendererHelper.formatETA(t) + ' '; + }; if (have_dn) { s += TorrentRendererHelper.formatDL(t); }; -- 2.40.0