From 0985f97b36c6e511fa96446aa2c7688b2af2e622 Mon Sep 17 00:00:00 2001 From: Alex Shnitman Date: Fri, 20 Oct 2023 09:41:40 +0300 Subject: [PATCH] fix download ETA dispay --- ui/src/app/downloads.pipe.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/app/downloads.pipe.ts b/ui/src/app/downloads.pipe.ts index 49927e9..55223c3 100644 --- a/ui/src/app/downloads.pipe.ts +++ b/ui/src/app/downloads.pipe.ts @@ -9,14 +9,14 @@ export class EtaPipe implements PipeTransform { return null; } if (value < 60) { - return `${value}s`; + return `${Math.round(value)}s`; } if (value < 3600) { - return `${Math.floor(value/60)}m ${value%60}s`; + return `${Math.floor(value/60)}m ${Math.round(value%60)}s`; } const hours = Math.floor(value/3600) const minutes = value % 3600 - return `${hours}h ${Math.floor(minutes/60)}m ${Math.floor(minutes%60)}s`; + return `${hours}h ${Math.floor(minutes/60)}m ${Math.round(minutes%60)}s`; } }