From 108099b30da62c01e90d985db870937471266337 Mon Sep 17 00:00:00 2001 From: Viren070 Date: Sat, 25 Oct 2025 16:13:51 +0100 Subject: [PATCH] fix: parse size strings using bytes library for accurate size conversion --- packages/core/src/parser/streams.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/parser/streams.ts b/packages/core/src/parser/streams.ts index c10a587d..b3508884 100644 --- a/packages/core/src/parser/streams.ts +++ b/packages/core/src/parser/streams.ts @@ -1,3 +1,4 @@ +import bytes from 'bytes'; import { Stream, ParsedStream, Addon, ParsedFile } from '../db/index.js'; import { constants, @@ -267,7 +268,7 @@ class StreamParser { (stream.name && this.calculateBytesFromSizeString(stream.name)); if (typeof size === 'string') { - size = parseInt(size); + size = bytes.parse(size); } else if (typeof size === 'number') { size = Math.round(size); }