From 88390800696f9eeac4fa31837ad633bf0873e7d9 Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Thu, 5 Mar 2026 02:46:10 +0100 Subject: [PATCH] Show live extraction progress in package postProcessLabel Update postProcessLabel during extraction with detailed progress: - Overall percentage and archive count (e.g. "Entpacken 45% (3/6)") - Password cracking progress when testing passwords - Works for both hybrid and full extraction modes Previously the label was static "Entpacken..." with no detail about what was happening during potentially long extraction phases. Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- src/main/download-manager.ts | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4763593..3bd0d83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "real-debrid-downloader", - "version": "1.6.40", + "version": "1.6.41", "description": "Desktop downloader", "main": "build/main/main/main.js", "author": "Sucukdeluxe", diff --git a/src/main/download-manager.ts b/src/main/download-manager.ts index fb076f9..da63efe 100644 --- a/src/main/download-manager.ts +++ b/src/main/download-manager.ts @@ -6433,6 +6433,18 @@ export class DownloadManager extends EventEmitter { } } + // Update package-level label with overall extraction progress + const activeArchive = Number(progress.archivePercent ?? 0) > 0 ? 1 : 0; + const currentDisplay = Math.max(0, Math.min(progress.total, progress.current + activeArchive)); + if (progress.passwordFound) { + pkg.postProcessLabel = `Passwort gefunden · ${progress.archiveName || ""}`; + } else if (progress.passwordAttempt && progress.passwordTotal && progress.passwordTotal > 1) { + const pwPct = Math.round((progress.passwordAttempt / progress.passwordTotal) * 100); + pkg.postProcessLabel = `Passwort knacken: ${pwPct}%`; + } else { + pkg.postProcessLabel = `Entpacken ${progress.percent}% (${currentDisplay}/${progress.total})`; + } + // Throttled emit — also promote "Warten auf Parts" items that // completed downloading in the meantime to "Ausstehend". const now = nowMs(); @@ -6609,12 +6621,13 @@ export class DownloadManager extends EventEmitter { resolveArchiveItemsFromList(archiveName, completedItems); let lastExtractEmitAt = 0; - const emitExtractStatus = (_text: string, force = false): void => { + const emitExtractStatus = (text: string, force = false): void => { const now = nowMs(); if (!force && now - lastExtractEmitAt < EXTRACT_PROGRESS_EMIT_INTERVAL_MS) { return; } lastExtractEmitAt = now; + pkg.postProcessLabel = text || "Entpacken..."; this.emitState(); };