Compare commits
No commits in common. "0042ce0adb311b25534f65d998fea99ac81c40e3" and "b02f37cda559dd49d8db87b4c2249421d26a50e8" have entirely different histories.
0042ce0adb
...
b02f37cda5
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.7.15",
|
"version": "1.7.14",
|
||||||
"description": "Desktop downloader",
|
"description": "Desktop downloader",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -336,10 +336,6 @@ function isProviderBusyUnrestrictError(errorText: string): boolean {
|
|||||||
|| text.includes("zu viele downloads");
|
|| text.includes("zu viele downloads");
|
||||||
}
|
}
|
||||||
|
|
||||||
function isHosterUnavailableError(errorText: string): boolean {
|
|
||||||
return String(errorText || "").toLowerCase().includes("hosternotavailable");
|
|
||||||
}
|
|
||||||
|
|
||||||
function isTemporaryUnrestrictError(errorText: string): boolean {
|
function isTemporaryUnrestrictError(errorText: string): boolean {
|
||||||
const text = String(errorText || "").toLowerCase();
|
const text = String(errorText || "").toLowerCase();
|
||||||
return text.includes("server error")
|
return text.includes("server error")
|
||||||
@ -5294,7 +5290,7 @@ export class DownloadManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
// Record failure for the provider that errored
|
// Record failure for the provider that errored
|
||||||
const errText = compactErrorText(unrestrictError);
|
const errText = compactErrorText(unrestrictError);
|
||||||
if (isUnrestrictFailure(errText) && !isHosterUnavailableError(errText)) {
|
if (isUnrestrictFailure(errText)) {
|
||||||
this.recordProviderFailure(cooldownProvider);
|
this.recordProviderFailure(cooldownProvider);
|
||||||
if (isProviderBusyUnrestrictError(errText) || isTemporaryUnrestrictError(errText)) {
|
if (isProviderBusyUnrestrictError(errText) || isTemporaryUnrestrictError(errText)) {
|
||||||
const busyCooldownMs = isTemporaryUnrestrictError(errText)
|
const busyCooldownMs = isTemporaryUnrestrictError(errText)
|
||||||
@ -5659,33 +5655,6 @@ export class DownloadManager extends EventEmitter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// hosterNotAvailable: hoster issue, not provider issue — reset provider
|
|
||||||
// and retry quickly with fresh provider selection (like manual reset)
|
|
||||||
if (isHosterUnavailableError(errorText) && active.unrestrictRetries < maxUnrestrictRetries) {
|
|
||||||
active.unrestrictRetries += 1;
|
|
||||||
item.retries += 1;
|
|
||||||
item.provider = null; // fresh provider selection on next attempt
|
|
||||||
// Cap backoff at 30s — hoster issues often resolve quickly
|
|
||||||
const hosterDelayMs = Math.min(30000, Math.floor(5000 * Math.pow(1.5, Math.min(active.unrestrictRetries - 1, 5))));
|
|
||||||
logger.warn(`Hoster nicht verfügbar: item=${item.fileName || item.id}, retry=${active.unrestrictRetries}/${retryDisplayLimit}, delay=${hosterDelayMs}ms, link=${item.url.slice(0, 80)}`);
|
|
||||||
if (item.downloadedBytes > 0) {
|
|
||||||
const targetFile = this.claimedTargetPathByItem.get(item.id) || "";
|
|
||||||
if (targetFile) {
|
|
||||||
try { fs.rmSync(targetFile, { force: true }); } catch { /* ignore */ }
|
|
||||||
}
|
|
||||||
this.releaseTargetPath(item.id);
|
|
||||||
item.downloadedBytes = 0;
|
|
||||||
item.progressPercent = 0;
|
|
||||||
item.totalBytes = null;
|
|
||||||
this.dropItemContribution(item.id);
|
|
||||||
}
|
|
||||||
this.queueRetry(item, active, hosterDelayMs, `Hoster nicht verfügbar, Retry ${active.unrestrictRetries}/${retryDisplayLimit} (${Math.ceil(hosterDelayMs / 1000)}s)`);
|
|
||||||
item.lastError = errorText;
|
|
||||||
this.persistSoon();
|
|
||||||
this.emitState();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isUnrestrictFailure(errorText) && active.unrestrictRetries < maxUnrestrictRetries) {
|
if (isUnrestrictFailure(errorText) && active.unrestrictRetries < maxUnrestrictRetries) {
|
||||||
active.unrestrictRetries += 1;
|
active.unrestrictRetries += 1;
|
||||||
item.retries += 1;
|
item.retries += 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user