Show "Jetzt entpacken" context menu when any item is completed, re-enable paused packages
Some checks are pending
Build and Release / build (push) Waiting to run
Some checks are pending
Build and Release / build (push) Waiting to run
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fa30e738d9
commit
19a588a997
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.5.47",
|
"version": "1.5.48",
|
||||||
"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",
|
||||||
|
|||||||
@ -3069,6 +3069,9 @@ export class DownloadManager extends EventEmitter {
|
|||||||
const pkg = this.session.packages[packageId];
|
const pkg = this.session.packages[packageId];
|
||||||
if (!pkg || pkg.cancelled) return;
|
if (!pkg || pkg.cancelled) return;
|
||||||
if (this.packagePostProcessTasks.has(packageId)) return;
|
if (this.packagePostProcessTasks.has(packageId)) return;
|
||||||
|
if (!pkg.enabled) {
|
||||||
|
pkg.enabled = true;
|
||||||
|
}
|
||||||
const items = pkg.itemIds.map((id) => this.session.items[id]).filter(Boolean) as DownloadItem[];
|
const items = pkg.itemIds.map((id) => this.session.items[id]).filter(Boolean) as DownloadItem[];
|
||||||
const completedItems = items.filter((item) => item.status === "completed");
|
const completedItems = items.filter((item) => item.status === "completed");
|
||||||
if (completedItems.length === 0) return;
|
if (completedItems.length === 0) return;
|
||||||
|
|||||||
@ -2679,15 +2679,11 @@ export function App(): ReactElement {
|
|||||||
{hasPackages && !multi && (() => {
|
{hasPackages && !multi && (() => {
|
||||||
const pkg = snapshot.session.packages[contextMenu.packageId];
|
const pkg = snapshot.session.packages[contextMenu.packageId];
|
||||||
const items = pkg?.itemIds.map((id) => snapshot.session.items[id]).filter(Boolean) || [];
|
const items = pkg?.itemIds.map((id) => snapshot.session.items[id]).filter(Boolean) || [];
|
||||||
const hasExtractError = items.some((item) => item && /^Entpack-Fehler/i.test(item.fullStatus));
|
const someCompleted = items.some((item) => item && item.status === "completed");
|
||||||
const allCompleted = items.length > 0 && items.every((item) => item && item.status === "completed");
|
|
||||||
return (<>
|
return (<>
|
||||||
{allCompleted && (
|
{someCompleted && (
|
||||||
<button className="ctx-menu-item" onClick={() => { void window.rd.extractNow(contextMenu.packageId); setContextMenu(null); }}>Jetzt entpacken</button>
|
<button className="ctx-menu-item" onClick={() => { void window.rd.extractNow(contextMenu.packageId); setContextMenu(null); }}>Jetzt entpacken</button>
|
||||||
)}
|
)}
|
||||||
{hasExtractError && (
|
|
||||||
<button className="ctx-menu-item" onClick={() => { void window.rd.retryExtraction(contextMenu.packageId); setContextMenu(null); }}>Extraktion wiederholen</button>
|
|
||||||
)}
|
|
||||||
</>);
|
</>);
|
||||||
})()}
|
})()}
|
||||||
{hasPackages && (
|
{hasPackages && (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user