Compare commits

..

No commits in common. "d8535990ae4068e11fde4ad286c1f4e7d9e6f5ba" and "734c4e9968be962647e7cb7de6191bed67b504e8" have entirely different histories.

2 changed files with 6 additions and 45 deletions

View File

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

View File

@ -1274,34 +1274,6 @@ export function extractArchiveNameFromExtractorLogMessage(message: string): stri
return null; return null;
} }
function summarizeExtractFailureReason(reason: string): string {
const text = compactErrorText(reason).replace(/^Error:\s*/i, "").trim();
if (!text) {
return "Entpacken fehlgeschlagen";
}
if (/checksum error|crc/i.test(text)) {
return "Checksum/CRC-Fehler im Archiv";
}
if (/wrong password|falsches passwort|password/i.test(text) && /checksum error in the encrypted file/i.test(text)) {
return "Checksum- oder Passwortfehler im verschluesselten Archiv";
}
if (/missing_file|next volume is required|cannot find volume|volume.*missing|part.*missing/i.test(text)) {
return "Teilarchiv fehlt oder ist nicht lesbar";
}
if (/unexpected end of archive|no end header found|invalid or unsupported zip format|not a rar archive|ungueltig|unsupported_format/i.test(text)) {
return "Archiv unvollstaendig oder ungueltig";
}
return text;
}
function formatExtractFailureLabel(reason: string, archiveName = ""): string {
const summary = summarizeExtractFailureReason(reason);
const archive = String(archiveName || "").trim();
return archive
? `Entpack-Fehler [${archive}]: ${summary}`
: `Entpack-Fehler: ${summary}`;
}
function retryDelayWithJitter(attempt: number, baseMs: number): number { function retryDelayWithJitter(attempt: number, baseMs: number): number {
const exponential = baseMs * Math.pow(1.5, Math.min(attempt - 1, 14)); const exponential = baseMs * Math.pow(1.5, Math.min(attempt - 1, 14));
const capped = Math.min(exponential, 120000); const capped = Math.min(exponential, 120000);
@ -5605,7 +5577,7 @@ export class DownloadManager extends EventEmitter {
if (entry.status !== "completed" || isExtractedLabel(entry.fullStatus)) { if (entry.status !== "completed" || isExtractedLabel(entry.fullStatus)) {
continue; continue;
} }
entry.fullStatus = formatExtractFailureLabel(reason, archiveName); entry.fullStatus = `Entpack-Fehler: ${reason}`;
entry.updatedAt = appliedAt; entry.updatedAt = appliedAt;
affectedItemIds.add(entry.id); affectedItemIds.add(entry.id);
} }
@ -5622,7 +5594,7 @@ export class DownloadManager extends EventEmitter {
const currentStatus = String(entry.fullStatus || "").trim(); const currentStatus = String(entry.fullStatus || "").trim();
if (currentStatus === "Entpacken - Error") { if (currentStatus === "Entpacken - Error") {
entry.fullStatus = formatExtractFailureLabel(fallbackReason); entry.fullStatus = `Entpack-Fehler: ${fallbackReason}`;
entry.updatedAt = appliedAt; entry.updatedAt = appliedAt;
appliedSpecificFailure = true; appliedSpecificFailure = true;
continue; continue;
@ -5643,7 +5615,7 @@ export class DownloadManager extends EventEmitter {
for (const entry of completedItems) { for (const entry of completedItems) {
if (entry.status === "completed" && !isExtractedLabel(entry.fullStatus)) { if (entry.status === "completed" && !isExtractedLabel(entry.fullStatus)) {
entry.fullStatus = formatExtractFailureLabel(fallbackReason); entry.fullStatus = `Entpack-Fehler: ${fallbackReason}`;
entry.updatedAt = appliedAt; entry.updatedAt = appliedAt;
} }
} }
@ -10344,17 +10316,6 @@ export class DownloadManager extends EventEmitter {
if (result.failed > 0) { if (result.failed > 0) {
const reason = compactErrorText(result.lastError || "Entpacken fehlgeschlagen"); const reason = compactErrorText(result.lastError || "Entpacken fehlgeschlagen");
const failAt = nowMs(); const failAt = nowMs();
if (fullFailedArchiveErrors.size > 0) {
const archiveSummaries = [...fullFailedArchiveErrors.entries()]
.slice(0, 3)
.map(([archiveName, errorText]) => `${archiveName}: ${summarizeExtractFailureReason(errorText)}`)
.join(" | ");
logger.warn(`Post-Processing Entpacken Fehlerdetails: pkg=${pkg.name}, archives=${archiveSummaries}`);
this.logPackageForPackage(pkg, "WARN", "Post-Processing Entpacken Fehlerdetails", {
failedArchives: [...fullFailedArchiveErrors.keys()],
summary: archiveSummaries
});
}
this.applyPackageExtractFailureStatuses( this.applyPackageExtractFailureStatuses(
completedItems, completedItems,
resolveArchiveItems, resolveArchiveItems,
@ -10398,7 +10359,7 @@ export class DownloadManager extends EventEmitter {
logger.error(`Post-Processing Entpacken Timeout: pkg=${pkg.name}`); logger.error(`Post-Processing Entpacken Timeout: pkg=${pkg.name}`);
for (const entry of completedItems) { for (const entry of completedItems) {
if (entry.status === "completed" && !isExtractedLabel(entry.fullStatus)) { if (entry.status === "completed" && !isExtractedLabel(entry.fullStatus)) {
entry.fullStatus = formatExtractFailureLabel(timeoutReason); entry.fullStatus = `Entpack-Fehler: ${timeoutReason}`;
entry.updatedAt = nowMs(); entry.updatedAt = nowMs();
} }
} }
@ -10423,7 +10384,7 @@ export class DownloadManager extends EventEmitter {
logger.error(`Post-Processing Entpacken Exception: pkg=${pkg.name}, reason=${reason}`); logger.error(`Post-Processing Entpacken Exception: pkg=${pkg.name}, reason=${reason}`);
for (const entry of completedItems) { for (const entry of completedItems) {
if (entry.status === "completed" && !isExtractedLabel(entry.fullStatus)) { if (entry.status === "completed" && !isExtractedLabel(entry.fullStatus)) {
entry.fullStatus = formatExtractFailureLabel(reason); entry.fullStatus = `Entpack-Fehler: ${reason}`;
entry.updatedAt = nowMs(); entry.updatedAt = nowMs();
} }
} }