Compare commits
2 Commits
cd5c0c5e7b
...
ecfaf52ce9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecfaf52ce9 | ||
|
|
6b22c93554 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.7.39",
|
"version": "1.7.40",
|
||||||
"description": "Desktop downloader",
|
"description": "Desktop downloader",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -95,7 +95,7 @@ const DEFAULT_LOW_THROUGHPUT_TIMEOUT_MS = 120000;
|
|||||||
|
|
||||||
const DEFAULT_LOW_THROUGHPUT_MIN_BYTES = 64 * 1024;
|
const DEFAULT_LOW_THROUGHPUT_MIN_BYTES = 64 * 1024;
|
||||||
|
|
||||||
const MINI_DOWNLOAD_RETRY_THRESHOLD_BYTES = 100 * 1024;
|
const MINI_DOWNLOAD_RETRY_THRESHOLD_BYTES = 5 * 1024;
|
||||||
|
|
||||||
const ALLDEBRID_HOST_INFO_TTL_MS = 60000;
|
const ALLDEBRID_HOST_INFO_TTL_MS = 60000;
|
||||||
|
|
||||||
@ -1106,6 +1106,9 @@ export class DownloadManager extends EventEmitter {
|
|||||||
// archives are not retried on every subsequent post-processing wake-up.
|
// archives are not retried on every subsequent post-processing wake-up.
|
||||||
private hybridFailedArchives = new Map<string, Map<string, HybridFailedArchiveState>>();
|
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 reservedTargetPaths = new Map<string, string>();
|
||||||
|
|
||||||
private claimedTargetPathByItem = new Map<string, string>();
|
private claimedTargetPathByItem = new Map<string, string>();
|
||||||
@ -4169,6 +4172,10 @@ export class DownloadManager extends EventEmitter {
|
|||||||
if (!archiveKey) {
|
if (!archiveKey) {
|
||||||
this.hybridExtractedPaths.delete(packageId);
|
this.hybridExtractedPaths.delete(packageId);
|
||||||
this.hybridFailedArchives.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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4273,24 +4280,25 @@ export class DownloadManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hasValidSignature) {
|
if (hasValidSignature) {
|
||||||
// Check if other archives in this package were successfully extracted.
|
// Valid signature + suggestRedownload means both JVM and legacy extractors failed
|
||||||
// If a known password worked for siblings but NOT for this archive,
|
// (CRC/password error). Even with a valid header the content can be corrupt –
|
||||||
// the file is very likely corrupt despite having a valid header.
|
// encrypted RAR5 produces "Checksum error" indistinguishable from wrong password.
|
||||||
const otherItemsExtracted = items.some((item) =>
|
// Force re-download ONCE; use autoRecoveredForRedownload Set for loop protection.
|
||||||
item.status === "completed" && isExtractedLabel(item.fullStatus)
|
const redownloadKey = `${pkg.id}::${failure.archiveName}`;
|
||||||
&& !archiveItems.includes(item)
|
if (this.autoRecoveredForRedownload.has(redownloadKey)) {
|
||||||
);
|
|
||||||
if (otherItemsExtracted) {
|
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Auto-Recovery (${scope}): ${failure.archiveName} - Signatur gueltig aber ` +
|
`Auto-Recovery (${scope}): ${failure.archiveName} uebersprungen - ` +
|
||||||
`andere Archive im Paket bereits entpackt (bekanntes Passwort existiert). ` +
|
`wurde bereits einmal per Re-Download versucht (Loop-Schutz)`
|
||||||
`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;
|
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(
|
logger.warn(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user