Fix JVM extractor not falling back to legacy UnRAR on codec errors
When SevenZipJBinding reports "Archive file can't be opened with any of the registered codecs", the extractor now falls back to legacy UnRAR instead of failing immediately. Previously, backend mode "jvm" (the production default) only allowed fallback for UNSUPPORTEDMETHOD. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3dbb94d298
commit
6ee98328fb
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.5.68",
|
"version": "1.5.69",
|
||||||
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
|
"description": "Real-Debrid Downloader Desktop (Electron + React + TypeScript)",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -1289,12 +1289,19 @@ async function runExternalExtract(
|
|||||||
}
|
}
|
||||||
|
|
||||||
jvmFailureReason = jvmResult.errorText || "JVM-Extractor fehlgeschlagen";
|
jvmFailureReason = jvmResult.errorText || "JVM-Extractor fehlgeschlagen";
|
||||||
|
const jvmFailureLower = jvmFailureReason.toLowerCase();
|
||||||
const isUnsupportedMethod = jvmFailureReason.includes("UNSUPPORTEDMETHOD");
|
const isUnsupportedMethod = jvmFailureReason.includes("UNSUPPORTEDMETHOD");
|
||||||
if (backendMode === "jvm" && !isUnsupportedMethod) {
|
const isCodecError = jvmFailureLower.includes("registered codecs")
|
||||||
|
|| jvmFailureLower.includes("can not open")
|
||||||
|
|| jvmFailureLower.includes("cannot open archive");
|
||||||
|
const shouldFallbackToLegacy = isUnsupportedMethod || isCodecError;
|
||||||
|
if (backendMode === "jvm" && !shouldFallbackToLegacy) {
|
||||||
throw new Error(jvmFailureReason);
|
throw new Error(jvmFailureReason);
|
||||||
}
|
}
|
||||||
if (isUnsupportedMethod) {
|
if (isUnsupportedMethod) {
|
||||||
logger.warn(`JVM-Extractor: Komprimierungsmethode nicht unterstützt, fallback auf Legacy: ${path.basename(archivePath)}`);
|
logger.warn(`JVM-Extractor: Komprimierungsmethode nicht unterstützt, fallback auf Legacy: ${path.basename(archivePath)}`);
|
||||||
|
} else if (isCodecError) {
|
||||||
|
logger.warn(`JVM-Extractor: Archiv-Format nicht erkannt, fallback auf Legacy: ${path.basename(archivePath)}`);
|
||||||
} else {
|
} else {
|
||||||
logger.warn(`JVM-Extractor Fehler, fallback auf Legacy: ${jvmFailureReason}`);
|
logger.warn(`JVM-Extractor Fehler, fallback auf Legacy: ${jvmFailureReason}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user