Compare commits

..

No commits in common. "da9417c4f7461e5a57ab84b2f9846c4807564d34" and "68bfeb574f85889f86c537321c7edc44a086e371" have entirely different histories.

2 changed files with 2 additions and 19 deletions

View File

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

View File

@ -10110,30 +10110,13 @@ export class DownloadManager extends EventEmitter {
.filter((entry) => entry.isFile()) .filter((entry) => entry.isFile())
.map((entry) => entry.name); .map((entry) => entry.name);
} catch { /* ignore */ } } catch { /* ignore */ }
const archiveStems = new Set<string>();
for (const archiveKey of readyArchives) { for (const archiveKey of readyArchives) {
const parts = collectArchiveCleanupTargets(archiveKey, dirFiles); const parts = collectArchiveCleanupTargets(archiveKey, dirFiles);
for (const part of parts) { for (const part of parts) {
const partName = path.basename(part).toLowerCase(); hybridFileNames.add(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, "");
if (stem && stem !== partName) archiveStems.add(stem);
} }
hybridFileNames.add(path.basename(archiveKey).toLowerCase()); hybridFileNames.add(path.basename(archiveKey).toLowerCase());
} }
// Include companion metadata files (.sfv, .nfo, etc.) that belong to the same archive set.
// These files share the same basename stem as the archive parts.
if (dirFiles && archiveStems.size > 0) {
for (const fileName of dirFiles) {
const lower = fileName.toLowerCase();
if (!KNOWN_SMALL_FILE_RE.test(lower)) continue;
const companionStem = lower.replace(/\.[^.]+$/, "");
if (archiveStems.has(companionStem)) {
hybridFileNames.add(lower);
}
}
}
const isHybridItem = (item: DownloadItem): boolean => { const isHybridItem = (item: DownloadItem): boolean => {
if (item.targetPath && hybridFileNames.has(path.basename(item.targetPath).toLowerCase())) { if (item.targetPath && hybridFileNames.has(path.basename(item.targetPath).toLowerCase())) {
return true; return true;