fix(downloads): restore hardened output scope release gates
Detect stale or foreign files in package-specific extraction directories before starting fresh work while excluding current and atomic ownership markers. Keep recursive directory inspection confined to the start-conflict boundary and let archive cleanup prune empty package directories directly. Register German-audio, auto-rename, collection, hybrid, and legacy fixtures through real complete PackageOutputScope records with current method signatures. Verify plain stops only persist after active work drains, while update-restart parking keeps both its immediate checkpoint and final queued state.
This commit is contained in:
@@ -9,6 +9,7 @@ import { createStoragePaths, emptySession } from "../src/main/storage";
|
||||
import { shutdownItemLogs } from "../src/main/item-log";
|
||||
import { shutdownPackageLogs } from "../src/main/package-log";
|
||||
import { shutdownRenameLog } from "../src/main/rename-log";
|
||||
import { registerPackageCompleteOutputs } from "./helpers/package-output-scope";
|
||||
|
||||
const tempDirs: string[] = [];
|
||||
|
||||
@@ -65,6 +66,7 @@ function setup(keepGermanAudioOnly: boolean): { extractDir: string; libraryDir:
|
||||
for (const f of [DL_MKV, PLAIN_MKV, DL_AVI]) {
|
||||
fs.writeFileSync(path.join(extractDir, f), "x");
|
||||
}
|
||||
registerPackageCompleteOutputs(pkg, [DL_MKV, PLAIN_MKV, DL_AVI].map((fileName) => path.join(extractDir, fileName)));
|
||||
return { extractDir, libraryDir, manager, pkg };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user