Skip to content

Commit

Permalink
fix: percentage rounding error
Browse files Browse the repository at this point in the history
  • Loading branch information
mdvanes committed May 13, 2024
1 parent 16a41a7 commit c0a1b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/server/src/downloadlist/downloadlist.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const mapToDownloadItem = (item: NormalizedTorrent): DownloadItem => ({
state: item.state,
simpleState: stateToSimpleState[item.state],
size: prettyBytes(item.totalSize),
percentage: Math.round(item.progress * 100),
percentage: Math.floor(item.progress * 100),
downloadSpeed: prettyBytes(item.downloadSpeed),
uploadSpeed: prettyBytes(item.uploadSpeed),
eta: item.eta > 0 ? prettyMs(item.eta * 1000, { compact: true }) : "",
Expand Down

0 comments on commit c0a1b98

Please sign in to comment.