Files
Multi-Debrid-Downloader/src/main/download-size.ts
T
Sucukdeluxe b670b92147 release: publish Multi-Debrid Downloader v2.0.15
Synchronize live speed telemetry, preserve known package sizes, refine responsive download status presentation, improve progress contrast and accessibility, simplify account creation, and prepare the verified v2.0.15 desktop release.
2026-08-10 20:38:11 +02:00

13 lines
453 B
TypeScript

export function mergeKnownTotalBytes(
currentTotalBytes: number | null | undefined,
replacementTotalBytes: number | null | undefined
): number | null {
if (replacementTotalBytes != null && Number.isFinite(replacementTotalBytes) && replacementTotalBytes > 0) {
return replacementTotalBytes;
}
if (currentTotalBytes != null && Number.isFinite(currentTotalBytes) && currentTotalBytes > 0) {
return currentTotalBytes;
}
return null;
}