From e56f783ef937f5886c53329b27cc924d4fe5657f Mon Sep 17 00:00:00 2001 From: Marius <36795828+kielerdotdev@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:34:03 +0200 Subject: [PATCH] Fix: Add support for TB and PB in formatBytes --- crates/librqbit/webui/src/helper/formatBytes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/librqbit/webui/src/helper/formatBytes.ts b/crates/librqbit/webui/src/helper/formatBytes.ts index 99f0099d..41c20fc7 100644 --- a/crates/librqbit/webui/src/helper/formatBytes.ts +++ b/crates/librqbit/webui/src/helper/formatBytes.ts @@ -2,7 +2,7 @@ export function formatBytes(bytes: number): string { if (bytes === 0) return "0 Bytes"; const k = 1024; - const sizes = ["Bytes", "KB", "MB", "GB"]; + const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB"]; const i = Math.floor(Math.log(bytes) / Math.log(k));