From 86a358d568661f64cda3588fc106ed92ca43e10d Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Wed, 4 Mar 2026 14:43:31 +0100 Subject: [PATCH] Release v1.6.9 Fix extraction resume state / progress sync, abort labels, and hybrid pkg.status Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- src/main/download-manager.ts | 16 +++++++++++++--- src/main/extractor.ts | 9 +++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0633cb2..77ab3f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "real-debrid-downloader", - "version": "1.6.8", + "version": "1.6.9", "description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)", "main": "build/main/main/main.js", "author": "Sucukdeluxe", diff --git a/src/main/download-manager.ts b/src/main/download-manager.ts index 1f46d80..5e2cf41 100644 --- a/src/main/download-manager.ts +++ b/src/main/download-manager.ts @@ -3495,9 +3495,15 @@ export class DownloadManager extends EventEmitter { if (!item || item.status !== "completed") { continue; } - if (/^Entpacken/i.test(item.fullStatus || "")) { - item.fullStatus = "Entpacken abgebrochen (wird fortgesetzt)"; - item.updatedAt = nowMs(); + const ft = (item.fullStatus || "").trim(); + if (/^Entpacken/i.test(ft)) { + // Only mark items with active extraction progress as "abgebrochen". + // Items that were just pending ("Ausstehend", "Warten auf Parts") weren't + // actively being extracted, so keep their label as-is. + if (ft !== "Entpacken - Ausstehend" && ft !== "Entpacken - Warten auf Parts") { + item.fullStatus = "Entpacken abgebrochen (wird fortgesetzt)"; + item.updatedAt = nowMs(); + } } } } @@ -3614,6 +3620,8 @@ export class DownloadManager extends EventEmitter { if (!allDone && this.settings.autoExtract && this.settings.hybridExtract && success > 0 && failed === 0) { const needsExtraction = items.some((item) => item.status === "completed" && !isExtractedLabel(item.fullStatus)); if (needsExtraction) { + pkg.status = "queued"; + pkg.updatedAt = nowMs(); for (const item of items) { if (item.status === "completed" && !isExtractedLabel(item.fullStatus)) { item.fullStatus = "Entpacken - Ausstehend"; @@ -3716,6 +3724,8 @@ export class DownloadManager extends EventEmitter { item.status === "completed" && !isExtractedLabel(item.fullStatus) ); if (needsExtraction) { + pkg.status = "queued"; + pkg.updatedAt = nowMs(); for (const item of items) { if (item.status === "completed" && !isExtractedLabel(item.fullStatus)) { item.fullStatus = "Entpacken - Ausstehend"; diff --git a/src/main/extractor.ts b/src/main/extractor.ts index d477d49..8c5a93e 100644 --- a/src/main/extractor.ts +++ b/src/main/extractor.ts @@ -1945,6 +1945,15 @@ export async function extractPackageArchives(options: ExtractOptions): Promise<{ emitProgress(extracted, "", "extracting"); + // Emit "done" progress for archives already completed via resume state + // so the caller's onProgress handler can mark their items as "Done" immediately + // rather than leaving them as "Entpacken - Ausstehend" until all extraction finishes. + for (const archivePath of candidates) { + if (resumeCompleted.has(archiveNameKey(path.basename(archivePath)))) { + emitProgress(extracted, path.basename(archivePath), "extracting", 100, 0); + } + } + const maxParallel = Math.max(1, options.maxParallel || 1); let noExtractorEncountered = false;