feat: use new electron version to get download speed

This commit is contained in:
Zamitto 2024-07-20 16:52:27 -03:00
parent 781e0f4102
commit 8a1931f75c
4 changed files with 10 additions and 10 deletions

View file

@ -30,11 +30,11 @@ export class GenericHTTPDownloader {
const result = {
numPeers: 0,
numSeeds: 0,
downloadSpeed: Number(status.downloadSpeed),
downloadSpeed: status.downloadSpeed,
timeRemaining: calculateETA(
Number(status.totalLength),
Number(status.completedLength),
Number(status.downloadSpeed)
status.totalLength,
status.completedLength,
status.downloadSpeed
),
isDownloadingMetadata: false,
isCheckingFiles: false,

View file

@ -16,7 +16,7 @@ export class HTTPDownload {
return {
completedLength: downloadItem.getReceivedBytes(),
totalLength: downloadItem.getTotalBytes(),
downloadSpeed: 0,
downloadSpeed: downloadItem.getCurrentBytesPerSecond(),
};
}