Skip to content

Commit

Permalink
fix download ETA dispay
Browse files Browse the repository at this point in the history
  • Loading branch information
alexta69 committed Oct 20, 2023
1 parent fb6b4a1 commit 0985f97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/app/downloads.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
}

Expand Down

0 comments on commit 0985f97

Please sign in to comment.