mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 09:13:57 +00:00
feat: use new electron version to get download speed
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -16,7 +16,7 @@ export class HTTPDownload {
|
||||
return {
|
||||
completedLength: downloadItem.getReceivedBytes(),
|
||||
totalLength: downloadItem.getTotalBytes(),
|
||||
downloadSpeed: 0,
|
||||
downloadSpeed: downloadItem.getCurrentBytesPerSecond(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user