From 27833615b7a383f86f8ee2e77aea46785c7861cc Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Wed, 4 Mar 2026 04:17:22 +0100 Subject: [PATCH] Release v1.5.96 Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- src/main/download-manager.ts | 15 ++++++++++++--- src/renderer/App.tsx | 10 +++++----- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index ea5a155..3253db5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "real-debrid-downloader", - "version": "1.5.95", + "version": "1.5.96", "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 0f9c6e4..e9a56d0 100644 --- a/src/main/download-manager.ts +++ b/src/main/download-manager.ts @@ -5686,13 +5686,19 @@ export class DownloadManager extends EventEmitter { return ready; } - // Build lookup: pathKey → item status for pending items + // Build lookup: pathKey → item status for pending items. + // Also map by filename (resolved against outputDir) so items without + // targetPath (never started) are still found by the disk-fallback check. const pendingItemStatus = new Map(); for (const itemId of pkg.itemIds) { const item = this.session.items[itemId]; - if (item && item.targetPath && item.status !== "completed") { + if (!item || item.status === "completed") continue; + if (item.targetPath) { pendingItemStatus.set(pathKey(item.targetPath), item.status); } + if (item.fileName && pkg.outputDir) { + pendingItemStatus.set(pathKey(path.join(pkg.outputDir, item.fileName)), item.status); + } } for (const candidate of candidates) { @@ -5811,8 +5817,11 @@ export class DownloadManager extends EventEmitter { }; const hybridItems = completedItems.filter(isHybridItem); + // Resolve archive items dynamically from ALL package items (not just + // the stale completedItems snapshot) so items that complete during + // extraction are included and get the correct "Done" label. const resolveArchiveItems = (archiveName: string): DownloadItem[] => - resolveArchiveItemsFromList(archiveName, hybridItems); + resolveArchiveItemsFromList(archiveName, items); // Track multiple active archives for parallel hybrid extraction const activeHybridArchiveMap = new Map(); diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index de95f65..f5e1ae4 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -662,14 +662,14 @@ export function App(): ReactElement { const itemCount = Object.keys(state.session.items).length; let flushDelay = itemCount >= 1500 - ? 1200 + ? 900 : itemCount >= 700 - ? 920 + ? 650 : itemCount >= 250 - ? 640 - : 300; + ? 400 + : 150; if (!state.session.running) { - flushDelay = Math.min(flushDelay, 320); + flushDelay = Math.min(flushDelay, 200); } if (activeTabRef.current !== "downloads") { flushDelay = Math.max(flushDelay, 800);