Compare commits

..

No commits in common. "ecfaf52ce9141b1a69636b1031c109ab3430e9bd" and "cd5c0c5e7b62baa6ad2c88a48bec1e611aba81a3" have entirely different histories.

2 changed files with 16 additions and 24 deletions

View File

@ -1,6 +1,6 @@
{
"name": "real-debrid-downloader",
"version": "1.7.40",
"version": "1.7.39",
"description": "Desktop downloader",
"main": "build/main/main/main.js",
"author": "Sucukdeluxe",

View File

@ -95,7 +95,7 @@ const DEFAULT_LOW_THROUGHPUT_TIMEOUT_MS = 120000;
const DEFAULT_LOW_THROUGHPUT_MIN_BYTES = 64 * 1024;
const MINI_DOWNLOAD_RETRY_THRESHOLD_BYTES = 5 * 1024;
const MINI_DOWNLOAD_RETRY_THRESHOLD_BYTES = 100 * 1024;
const ALLDEBRID_HOST_INFO_TTL_MS = 60000;
@ -1106,9 +1106,6 @@ export class DownloadManager extends EventEmitter {
// archives are not retried on every subsequent post-processing wake-up.
private hybridFailedArchives = new Map<string, Map<string, HybridFailedArchiveState>>();
/** Archives already auto-recovered via forced re-download (loop protection). */
private autoRecoveredForRedownload = new Set<string>();
private reservedTargetPaths = new Map<string, string>();
private claimedTargetPathByItem = new Map<string, string>();
@ -4172,10 +4169,6 @@ export class DownloadManager extends EventEmitter {
if (!archiveKey) {
this.hybridExtractedPaths.delete(packageId);
this.hybridFailedArchives.delete(packageId);
// Also clear re-download loop protection for this package
for (const key of this.autoRecoveredForRedownload) {
if (key.startsWith(`${packageId}::`)) this.autoRecoveredForRedownload.delete(key);
}
return;
}
@ -4280,25 +4273,24 @@ export class DownloadManager extends EventEmitter {
}
if (hasValidSignature) {
// Valid signature + suggestRedownload means both JVM and legacy extractors failed
// (CRC/password error). Even with a valid header the content can be corrupt
// encrypted RAR5 produces "Checksum error" indistinguishable from wrong password.
// Force re-download ONCE; use autoRecoveredForRedownload Set for loop protection.
const redownloadKey = `${pkg.id}::${failure.archiveName}`;
if (this.autoRecoveredForRedownload.has(redownloadKey)) {
// Check if other archives in this package were successfully extracted.
// If a known password worked for siblings but NOT for this archive,
// the file is very likely corrupt despite having a valid header.
const otherItemsExtracted = items.some((item) =>
item.status === "completed" && isExtractedLabel(item.fullStatus)
&& !archiveItems.includes(item)
);
if (otherItemsExtracted) {
logger.warn(
`Auto-Recovery (${scope}): ${failure.archiveName} uebersprungen - ` +
`wurde bereits einmal per Re-Download versucht (Loop-Schutz)`
`Auto-Recovery (${scope}): ${failure.archiveName} - Signatur gueltig aber ` +
`andere Archive im Paket bereits entpackt (bekanntes Passwort existiert). ` +
`Erzwinge Re-Download aller ${archiveItems.length} Parts (wahrscheinliche Korruption)`
);
corruptArchiveItems.push(...inspectedArchiveItems);
} else {
logger.warn(`Auto-Recovery (${scope}): ${failure.archiveName} uebersprungen - Dateien korrekte Groesse, Archiv-Signatur gueltig (vermutlich falsches Passwort)`);
return 0;
}
this.autoRecoveredForRedownload.add(redownloadKey);
logger.warn(
`Auto-Recovery (${scope}): ${failure.archiveName} - Signatur gueltig, ` +
`beide Extraktoren fehlgeschlagen (suggestRedownload). ` +
`Erzwinge Re-Download aller ${archiveItems.length} Parts`
);
corruptArchiveItems.push(...inspectedArchiveItems);
}
logger.warn(