diff --git a/bin/u2c.py b/bin/u2c.py index 6cbbf89d..2bdcf2f9 100755 --- a/bin/u2c.py +++ b/bin/u2c.py @@ -1090,6 +1090,8 @@ class Ctl(object): spd = humansize(spd) self.eta = str(datetime.timedelta(seconds=int(eta))) + if eta > 2591999: + self.eta = self.eta.split(",")[0] # truncate HH:MM:SS sleft = humansize(self.nbytes - self.up_b) nleft = self.nfiles - self.up_f tail = "\033[K\033[u" if VT100 and not self.ar.ns else "\r" diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 35f16372..67d88b95 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -881,6 +881,8 @@ if (window.Number && Number.isFinite) function f2f(val, nd) { // 10.toFixed(1) returns 10.00 for certain values of 10 + if (!isNum(val)) + val = 999; val = (val * Math.pow(10, nd)).toFixed(0).split('.')[0]; return nd ? (val.slice(0, -nd) || '0') + '.' + val.slice(-nd) : val; }