Show TB for sizes >= 1 TiB in humanSize formatter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe 2026-03-04 00:00:43 +01:00
parent 62f3bd94de
commit 8f10ff8f96
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "real-debrid-downloader",
"version": "1.5.80",
"version": "1.5.81",
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
"main": "build/main/main/main.js",
"author": "Sucukdeluxe",

View File

@ -131,7 +131,8 @@ function humanSize(bytes: number): string {
if (bytes < 1024) { return `${bytes} B`; }
if (bytes < 1024 * 1024) { return `${(bytes / 1024).toFixed(1)} KB`; }
if (bytes < 1024 * 1024 * 1024) { return `${(bytes / (1024 * 1024)).toFixed(2)} MB`; }
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
if (bytes < 1024 * 1024 * 1024 * 1024) { return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`; }
return `${(bytes / (1024 * 1024 * 1024 * 1024)).toFixed(3)} TB`;
}
interface BandwidthChartProps {