From 67fc3a8e1c88cb633d132d15c9d839f12cfe46be Mon Sep 17 00:00:00 2001 From: Sucukdeluxe Date: Sat, 7 Mar 2026 17:01:58 +0100 Subject: [PATCH] Treat hosterNotAvailable as temporary error with retry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move hosterNotAvailable from isPermanentLinkError to isTemporaryUnrestrictError — hoster being unavailable is usually transient (overload, maintenance) and should be retried with backoff instead of immediately failing as "Link ungültig". Co-Authored-By: Claude Opus 4.6 --- src/main/download-manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/download-manager.ts b/src/main/download-manager.ts index 9c5872d..af16f5b 100644 --- a/src/main/download-manager.ts +++ b/src/main/download-manager.ts @@ -302,7 +302,6 @@ function isFetchFailure(errorText: string): boolean { function isPermanentLinkError(errorText: string): boolean { const text = String(errorText || "").toLowerCase(); return text.includes("permanent ungültig") - || text.includes("hosternotavailable") || /file.?not.?found/.test(text) || /file.?unavailable/.test(text) || /link.?is.?dead/.test(text) @@ -351,7 +350,8 @@ function isTemporaryUnrestrictError(errorText: string): boolean { || text.includes("bad gateway") || text.includes("gateway timeout") || text.includes("cloudflare") - || text.includes("worker error"); + || text.includes("worker error") + || text.includes("hosternotavailable"); } function isFinishedStatus(status: DownloadStatus): boolean {