Clear stale status texts on session load

Items with transient status texts like Provider-Cooldown, Warte auf
Daten, Verbindungsfehler are reset to "Wartet" when the app restarts,
so they don't show misleading status from a previous session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe 2026-03-02 21:24:58 +01:00
parent 5023a99f91
commit 05dc0ca1c6
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "real-debrid-downloader", "name": "real-debrid-downloader",
"version": "1.5.23", "version": "1.5.24",
"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",

View File

@ -2526,8 +2526,17 @@ export class DownloadManager extends EventEmitter {
|| item.status === "paused" || item.status === "paused"
|| item.status === "reconnect_wait") { || item.status === "reconnect_wait") {
item.status = "queued"; item.status = "queued";
item.fullStatus = "Wartet";
item.speedBps = 0; item.speedBps = 0;
} }
// Clear stale transient status texts from previous session
if (item.status === "queued" && item.fullStatus) {
const fs = item.fullStatus.toLowerCase();
if (fs.includes("provider-cooldown") || fs.includes("warte auf daten") || fs.includes("keine daten")
|| fs.includes("link wird umgewandelt") || fs.includes("verbindungsfehler")) {
item.fullStatus = "Wartet";
}
}
} }
for (const pkg of Object.values(this.session.packages)) { for (const pkg of Object.values(this.session.packages)) {
if (pkg.enabled === undefined) { if (pkg.enabled === undefined) {