Separate pause/resume buttons, fix hybrid extraction during pause
- Pause button is now one-way (orange glow when paused, disabled when already paused). Start button resumes from pause. - Fix hybrid extraction attempting incomplete multi-part archives when paused: disk-fallback now blocks any non-terminal item status, not just downloading/validating/integrity_check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e6c17393fb
commit
549328893e
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.5.1",
|
"version": "1.5.11",
|
||||||
"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",
|
||||||
|
|||||||
@ -4786,7 +4786,7 @@ export class DownloadManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
const anyActivelyProcessing = missingParts.some((part) => {
|
const anyActivelyProcessing = missingParts.some((part) => {
|
||||||
const status = pendingItemStatus.get(pathKey(part));
|
const status = pendingItemStatus.get(pathKey(part));
|
||||||
return status === "downloading" || status === "validating" || status === "integrity_check";
|
return status !== undefined && status !== "failed" && status !== "cancelled";
|
||||||
});
|
});
|
||||||
if (anyActivelyProcessing) {
|
if (anyActivelyProcessing) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -1903,18 +1903,25 @@ export function App(): ReactElement {
|
|||||||
<div className="buttons buttons-left">
|
<div className="buttons buttons-left">
|
||||||
<button
|
<button
|
||||||
className="ctrl-icon-btn ctrl-play"
|
className="ctrl-icon-btn ctrl-play"
|
||||||
title="Start"
|
title={snapshot.session.paused ? "Fortsetzen" : "Start"}
|
||||||
disabled={actionBusy || !snapshot.canStart}
|
disabled={actionBusy || (!snapshot.canStart && !snapshot.session.paused)}
|
||||||
onClick={() => { void onStartDownloads(); }}
|
onClick={() => {
|
||||||
|
if (snapshot.session.paused) {
|
||||||
|
setSnapshot((prev) => ({ ...prev, session: { ...prev.session, paused: false } }));
|
||||||
|
void window.rd.togglePause();
|
||||||
|
} else {
|
||||||
|
void onStartDownloads();
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 24 24" width="18" height="18"><polygon points="6,3 20,12 6,21" fill="currentColor" /></svg>
|
<svg viewBox="0 0 24 24" width="18" height="18"><polygon points="6,3 20,12 6,21" fill="currentColor" /></svg>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`ctrl-icon-btn ctrl-pause${snapshot.session.running && !snapshot.session.paused ? " active" : ""}${snapshot.session.paused ? " paused" : ""}`}
|
className={`ctrl-icon-btn ctrl-pause${snapshot.session.paused ? " paused" : ""}`}
|
||||||
title={snapshot.session.paused ? "Fortsetzen" : "Pause"}
|
title="Pause"
|
||||||
disabled={!snapshot.canPause}
|
disabled={!snapshot.canPause || snapshot.session.paused}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSnapshot((prev) => ({ ...prev, session: { ...prev.session, paused: !prev.session.paused } }));
|
setSnapshot((prev) => ({ ...prev, session: { ...prev.session, paused: true } }));
|
||||||
void window.rd.togglePause();
|
void window.rd.togglePause();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -323,16 +323,18 @@ body,
|
|||||||
background: rgba(74, 222, 128, 0.1);
|
background: rgba(74, 222, 128, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctrl-icon-btn.ctrl-pause.active {
|
|
||||||
color: var(--accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ctrl-icon-btn.ctrl-pause:not(:disabled):hover {
|
.ctrl-icon-btn.ctrl-pause:not(:disabled):hover {
|
||||||
border-color: #f59e0b;
|
border-color: #f59e0b;
|
||||||
color: #f59e0b;
|
color: #f59e0b;
|
||||||
background: rgba(245, 158, 11, 0.1);
|
background: rgba(245, 158, 11, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ctrl-icon-btn.ctrl-pause.paused {
|
||||||
|
border-color: #f59e0b;
|
||||||
|
color: #f59e0b;
|
||||||
|
background: rgba(245, 158, 11, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
.ctrl-icon-btn.ctrl-stop:not(:disabled) {
|
.ctrl-icon-btn.ctrl-stop:not(:disabled) {
|
||||||
color: var(--danger);
|
color: var(--danger);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user