Release v1.4.16 with crash prevention and hang protection

- Add 30s fetch timeouts to ALL API calls (Real-Debrid, BestDebrid, AllDebrid, Mega-Web)
- Fix race condition in concurrent worker indexing (runWithConcurrency)
- Guard JSON.parse in RealDebrid response with try-catch
- Add try-catch to fs.mkdirSync in download pipeline (handles permission denied)
- Convert MD5/SHA1 hashing to streaming (prevents OOM on large files)
- Add error handling for hash manifest file reading
- Prevent infinite hangs on unresponsive API endpoints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-02-27 21:43:40 +01:00
co-authored by Claude Opus 4.6
parent 147269849d
commit ea6301d326
7 changed files with 58 additions and 21 deletions
+8 -2
View File
@@ -40,7 +40,8 @@ export class RealDebridClient {
"Content-Type": "application/x-www-form-urlencoded",
"User-Agent": "RD-Node-Downloader/1.1.12"
},
body
body,
signal: AbortSignal.timeout(30000)
});
const text = await response.text();
@@ -53,7 +54,12 @@ export class RealDebridClient {
throw new Error(parsed);
}
const payload = JSON.parse(text) as Record<string, unknown>;
let payload: Record<string, unknown>;
try {
payload = JSON.parse(text) as Record<string, unknown>;
} catch {
throw new Error(`Ungültige JSON-Antwort: ${text.slice(0, 120)}`);
}
const directUrl = String(payload.download || payload.link || "").trim();
if (!directUrl) {
throw new Error("Unrestrict ohne Download-URL");