fix: download speed

This commit is contained in:
Adrian Castro
2024-03-28 00:06:05 +01:00
parent 57cd3e642b
commit a709eb3f4c

View File

@@ -206,7 +206,7 @@ export const DownloadManagerProvider: React.FC<{ children: ReactNode }> = ({
if (timeElapsed === 0) return;
const newBytes = downloadProgress.bytesDownloaded - lastBytesWritten;
const speed = newBytes / timeElapsed / 1024;
const speed = newBytes / timeElapsed / 1024 / 1024;
const progress =
downloadProgress.bytesDownloaded / downloadProgress.bytesTotal;