Fix session runtime reset

This commit is contained in:
Sucukdeluxe
2026-03-09 06:06:39 +01:00
parent f447c0f37a
commit 4374119f9e
2 changed files with 33 additions and 2 deletions
+4 -2
View File
@@ -1822,13 +1822,15 @@ export class DownloadManager extends EventEmitter {
}
public resetSessionStats(): void {
const now = nowMs();
this.session.totalDownloadedBytes = 0;
this.sessionDownloadedBytes = 0;
this.sessionCompletedFiles = 0;
this.session.runStartedAt = this.session.running ? nowMs() : 0;
this.session.runStartedAt = this.session.running ? now : 0;
this.appSessionStartedAt = now;
this.session.summaryText = "";
this.lastGlobalProgressBytes = 0;
this.lastGlobalProgressAt = nowMs();
this.lastGlobalProgressAt = now;
this.speedEvents = [];
this.speedEventsHead = 0;
this.speedBytesLastWindow = 0;