Release v1.6.12
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
52909258ca
commit
dc695c9a04
@@ -161,7 +161,8 @@ export class AppController {
|
||||
}
|
||||
|
||||
public async installUpdate(onProgress?: (progress: UpdateInstallProgress) => void): Promise<UpdateInstallResult> {
|
||||
// Stop active downloads/extractions before installing to avoid data corruption
|
||||
// Stop active downloads before installing. Extractions may continue briefly
|
||||
// until prepareForShutdown() is called during app quit.
|
||||
if (this.manager.isSessionRunning()) {
|
||||
this.manager.stop();
|
||||
}
|
||||
@@ -294,9 +295,10 @@ export class AppController {
|
||||
this.settings = restoredSettings;
|
||||
saveSettings(this.storagePaths, this.settings);
|
||||
this.manager.setSettings(this.settings);
|
||||
// Stop the manager BEFORE saving the restored session to prevent
|
||||
// the auto-save timer from overwriting it with the old in-memory session.
|
||||
// Full stop including extraction abort — the old session is being replaced,
|
||||
// so no extraction tasks from it should keep running.
|
||||
this.manager.stop();
|
||||
this.manager.abortAllPostProcessing();
|
||||
const restoredSession = parsed.session as ReturnType<typeof loadSession>;
|
||||
saveSession(this.storagePaths, restoredSession);
|
||||
return { restored: true, message: "Backup wiederhergestellt. Bitte App neustarten." };
|
||||
|
||||
@@ -902,6 +902,14 @@ export class DownloadManager extends EventEmitter {
|
||||
return this.session.running;
|
||||
}
|
||||
|
||||
/** Abort all running post-processing tasks (extractions). */
|
||||
public abortAllPostProcessing(): void {
|
||||
this.abortPostProcessing("external");
|
||||
for (const waiter of this.packagePostProcessWaiters) { waiter.resolve(); }
|
||||
this.packagePostProcessWaiters = [];
|
||||
this.packagePostProcessActive = 0;
|
||||
}
|
||||
|
||||
/** Trigger pending extractions without starting the session (for autoExtractWhenStopped). */
|
||||
public triggerIdleExtractions(): void {
|
||||
if (this.session.running || !this.settings.autoExtract || !this.settings.autoExtractWhenStopped) {
|
||||
@@ -6258,14 +6266,14 @@ export class DownloadManager extends EventEmitter {
|
||||
if (!this.session.packages[packageId]) {
|
||||
return; // Package was fully cleaned up
|
||||
}
|
||||
pkg.status = (pkg.enabled && !this.session.paused) ? "downloading" : "paused";
|
||||
pkg.status = (pkg.enabled && this.session.running && !this.session.paused) ? "downloading" : "queued";
|
||||
pkg.updatedAt = nowMs();
|
||||
this.emitState();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!allDone) {
|
||||
pkg.status = (pkg.enabled && !this.session.paused) ? "downloading" : "paused";
|
||||
pkg.status = (pkg.enabled && this.session.running && !this.session.paused) ? "downloading" : "queued";
|
||||
logger.info(`Post-Processing verschoben: pkg=${pkg.name}, noch offene items`);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user