Release v1.6.11

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-03-04 15:03:29 +01:00
co-authored by Claude Opus 4.6
parent e9b9801ac1
commit 52909258ca
8 changed files with 43 additions and 9 deletions
+8
View File
@@ -112,6 +112,9 @@ export class AppController {
this.autoResumePending = false;
void this.manager.start().catch((err) => logger.warn(`Auto-Resume Start Fehler: ${String(err)}`));
logger.info("Auto-Resume beim Start aktiviert");
} else {
// Trigger pending extractions without starting the session
this.manager.triggerIdleExtractions();
}
}
}
@@ -158,6 +161,11 @@ export class AppController {
}
public async installUpdate(onProgress?: (progress: UpdateInstallProgress) => void): Promise<UpdateInstallResult> {
// Stop active downloads/extractions before installing to avoid data corruption
if (this.manager.isSessionRunning()) {
this.manager.stop();
}
const cacheAgeMs = Date.now() - this.lastUpdateCheckAt;
const cached = this.lastUpdateCheck && !this.lastUpdateCheck.error && cacheAgeMs <= 10 * 60 * 1000
? this.lastUpdateCheck
+2 -1
View File
@@ -86,6 +86,7 @@ export function defaultSettings(): AppSettings {
totalDownloadedAllTime: 0,
bandwidthSchedules: [],
columnOrder: ["name", "size", "progress", "hoster", "account", "prio", "status", "speed"],
extractCpuPriority: "high"
extractCpuPriority: "high",
autoExtractWhenStopped: true
};
}
+26 -4
View File
@@ -898,6 +898,21 @@ export class DownloadManager extends EventEmitter {
return this.summary;
}
public isSessionRunning(): boolean {
return this.session.running;
}
/** Trigger pending extractions without starting the session (for autoExtractWhenStopped). */
public triggerIdleExtractions(): void {
if (this.session.running || !this.settings.autoExtract || !this.settings.autoExtractWhenStopped) {
return;
}
this.recoverPostProcessingOnStartup();
this.triggerPendingExtractions();
this.persistSoon();
this.emitState();
}
public getSnapshot(): UiSnapshot {
const now = nowMs();
this.pruneSpeedEvents(now);
@@ -2924,6 +2939,7 @@ export class DownloadManager extends EventEmitter {
}
public stop(): void {
const keepExtraction = this.settings.autoExtractWhenStopped;
this.session.running = false;
this.session.paused = false;
this.session.reconnectUntil = 0;
@@ -2935,10 +2951,12 @@ export class DownloadManager extends EventEmitter {
this.speedBytesLastWindow = 0;
this.speedBytesPerPackage.clear();
this.speedEventsHead = 0;
this.abortPostProcessing("stop");
for (const waiter of this.packagePostProcessWaiters) { waiter.resolve(); }
this.packagePostProcessWaiters = [];
this.packagePostProcessActive = 0;
if (!keepExtraction) {
this.abortPostProcessing("stop");
for (const waiter of this.packagePostProcessWaiters) { waiter.resolve(); }
this.packagePostProcessWaiters = [];
this.packagePostProcessActive = 0;
}
for (const active of this.activeTasks.values()) {
active.abortReason = "stop";
active.abortController.abort("stop");
@@ -2953,6 +2971,10 @@ export class DownloadManager extends EventEmitter {
}
}
for (const pkg of Object.values(this.session.packages)) {
if (keepExtraction && (pkg.status === "extracting" || pkg.status === "integrity_check")) {
// Keep extraction-related statuses when autoExtractWhenStopped
continue;
}
if (pkg.status === "downloading" || pkg.status === "validating"
|| pkg.status === "extracting" || pkg.status === "integrity_check"
|| pkg.status === "paused" || pkg.status === "reconnect_wait") {
+1 -1
View File
@@ -238,7 +238,7 @@ function registerIpcHandlers(): void {
if (result.started) {
setTimeout(() => {
app.quit();
}, 800);
}, 2500);
}
return result;
});