Merge pull request #146 from tonsV2/master
ETA is now shown in compact view.
This commit is contained in:
commit
4df187885f
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue