Fix parallel extraction wrong_password false positives, preserve session download counter across stop/resume
- Retry failed wrong_password archives serially after parallel extraction to recover from CRC mismatches caused by concurrent UnRAR I/O contention - Stop resetting sessionDownloadedBytes on start/resume so the session total accurately reflects all bytes downloaded since app launch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
369d25a365
commit
8f6b87ae8c
@@ -3066,7 +3066,6 @@ export class DownloadManager extends EventEmitter {
|
||||
this.session.paused = false;
|
||||
this.session.runStartedAt = nowMs();
|
||||
this.session.totalDownloadedBytes = 0;
|
||||
this.sessionDownloadedBytes = 0;
|
||||
this.session.summaryText = "";
|
||||
this.session.reconnectUntil = 0;
|
||||
this.session.reconnectReason = "";
|
||||
@@ -3174,7 +3173,6 @@ export class DownloadManager extends EventEmitter {
|
||||
this.session.paused = false;
|
||||
this.session.runStartedAt = nowMs();
|
||||
this.session.totalDownloadedBytes = 0;
|
||||
this.sessionDownloadedBytes = 0;
|
||||
this.session.summaryText = "";
|
||||
this.session.reconnectUntil = 0;
|
||||
this.session.reconnectReason = "";
|
||||
@@ -3304,11 +3302,10 @@ export class DownloadManager extends EventEmitter {
|
||||
|
||||
this.session.running = true;
|
||||
this.session.paused = false;
|
||||
// By design: runStartedAt and totalDownloadedBytes reset on each start/resume so that
|
||||
// duration, average speed, and ETA are calculated relative to the current run, not cumulative.
|
||||
// Keep cumulative session bytes across stop/resume so the session total stays accurate.
|
||||
// Only runStartedAt resets (for ETA/speed calculations relative to current run).
|
||||
this.session.runStartedAt = nowMs();
|
||||
this.session.totalDownloadedBytes = 0;
|
||||
this.sessionDownloadedBytes = 0;
|
||||
this.session.summaryText = "";
|
||||
this.session.reconnectUntil = 0;
|
||||
this.session.reconnectReason = "";
|
||||
|
||||
Reference in New Issue
Block a user