mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: use new electron version to get download speed
This commit is contained in:
parent
781e0f4102
commit
8a1931f75c
4 changed files with 10 additions and 10 deletions
|
@ -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(),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue