0.10.2-16 Frontend Features

This commit is contained in:
2026-03-17 10:51:28 +00:00
parent 7615cf0b47
commit 17b3aeb94e
11 changed files with 114 additions and 20 deletions
+8 -3
View File
@@ -2110,9 +2110,14 @@ class HistoryService {
toNormalizedPath(resolvedPaths?.rawDir),
...explicitRawPaths.map((candidatePath) => toNormalizedPath(path.dirname(candidatePath)))
]);
// Only configured base dirs become protectedRoots (must never be deleted themselves)
const movieRoots = sanitizeRoots([
...getConfiguredMediaPathList(settings || {}, 'movie_dir'),
toNormalizedPath(resolvedPaths?.movieDir),
toNormalizedPath(resolvedPaths?.movieDir)
]);
// Includes parent dirs of output files for addCandidate safety checks
const movieAllowedPaths = sanitizeRoots([
...movieRoots,
...explicitMoviePaths.map((candidatePath) => toNormalizedPath(path.dirname(candidatePath)))
]);
@@ -2204,7 +2209,7 @@ class HistoryService {
'movie',
outputPath,
artifactMoviePathSet.has(outputPath) ? 'lineage_output_path' : 'output_path',
movieRoots
movieAllowedPaths
);
const parentDir = toNormalizedPath(path.dirname(outputPath));
if (parentDir && !movieRoots.includes(parentDir)) {
@@ -2213,7 +2218,7 @@ class HistoryService {
'movie',
parentDir,
artifactMoviePathSet.has(outputPath) ? 'lineage_output_parent' : 'output_parent',
movieRoots
movieAllowedPaths
);
}
}