Release v1.6.12
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
52909258ca
commit
dc695c9a04
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.6.11",
|
"version": "1.6.12",
|
||||||
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
|
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -161,7 +161,8 @@ export class AppController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async installUpdate(onProgress?: (progress: UpdateInstallProgress) => void): Promise<UpdateInstallResult> {
|
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()) {
|
if (this.manager.isSessionRunning()) {
|
||||||
this.manager.stop();
|
this.manager.stop();
|
||||||
}
|
}
|
||||||
@ -294,9 +295,10 @@ export class AppController {
|
|||||||
this.settings = restoredSettings;
|
this.settings = restoredSettings;
|
||||||
saveSettings(this.storagePaths, this.settings);
|
saveSettings(this.storagePaths, this.settings);
|
||||||
this.manager.setSettings(this.settings);
|
this.manager.setSettings(this.settings);
|
||||||
// Stop the manager BEFORE saving the restored session to prevent
|
// Full stop including extraction abort — the old session is being replaced,
|
||||||
// the auto-save timer from overwriting it with the old in-memory session.
|
// so no extraction tasks from it should keep running.
|
||||||
this.manager.stop();
|
this.manager.stop();
|
||||||
|
this.manager.abortAllPostProcessing();
|
||||||
const restoredSession = parsed.session as ReturnType<typeof loadSession>;
|
const restoredSession = parsed.session as ReturnType<typeof loadSession>;
|
||||||
saveSession(this.storagePaths, restoredSession);
|
saveSession(this.storagePaths, restoredSession);
|
||||||
return { restored: true, message: "Backup wiederhergestellt. Bitte App neustarten." };
|
return { restored: true, message: "Backup wiederhergestellt. Bitte App neustarten." };
|
||||||
|
|||||||
@ -902,6 +902,14 @@ export class DownloadManager extends EventEmitter {
|
|||||||
return this.session.running;
|
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). */
|
/** Trigger pending extractions without starting the session (for autoExtractWhenStopped). */
|
||||||
public triggerIdleExtractions(): void {
|
public triggerIdleExtractions(): void {
|
||||||
if (this.session.running || !this.settings.autoExtract || !this.settings.autoExtractWhenStopped) {
|
if (this.session.running || !this.settings.autoExtract || !this.settings.autoExtractWhenStopped) {
|
||||||
@ -6258,14 +6266,14 @@ export class DownloadManager extends EventEmitter {
|
|||||||
if (!this.session.packages[packageId]) {
|
if (!this.session.packages[packageId]) {
|
||||||
return; // Package was fully cleaned up
|
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();
|
pkg.updatedAt = nowMs();
|
||||||
this.emitState();
|
this.emitState();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!allDone) {
|
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`);
|
logger.info(`Post-Processing verschoben: pkg=${pkg.name}, noch offene items`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user