Compare commits

...

2 Commits

Author SHA1 Message Date
Sucukdeluxe
16a59acaef Release v1.7.129 2026-04-04 21:28:51 +02:00
Sucukdeluxe
49efebd001 Extend hybrid companion stem matching to all archive types
The stem extraction regex for matching companion metadata files (.sfv,
.nfo) to their archives only handled RAR patterns. Now also covers
ZIP, 7z, tar, generic splits, and recovery volumes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 21:28:06 +02:00
2 changed files with 7 additions and 3 deletions

View File

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

View File

@ -10116,8 +10116,12 @@ export class DownloadManager extends EventEmitter {
for (const part of parts) {
const partName = path.basename(part).toLowerCase();
hybridFileNames.add(partName);
// Collect archive base stems (without .partNN.rar / .rar / .rNN) to find companion files
const stem = partName.replace(/\.part\d+\.rar$|\.r\d{2,3}$|\.rar$/i, "");
// Collect archive base stems (strip all archive extensions) to find companion files
const stem = partName
.replace(/\.part\d+\.rar$/i, "")
.replace(/\.(rar|r\d{2,3}|zip|z\d{2,3}|7z|tar|gz|bz2|xz|tgz|tbz2|txz|rev)$/i, "")
.replace(/\.(zip|7z)\.\d{3}$/i, "")
.replace(/\.\d{3}$/i, "");
if (stem && stem !== partName) archiveStems.add(stem);
}
hybridFileNames.add(path.basename(archiveKey).toLowerCase());