Not storing shallow movie data when argument is disabled.

This commit is contained in:
DebaucheryLibrarian 2022-02-05 17:14:34 +01:00
parent 36d84fb98b
commit ceaf5a3217
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ async function init() {
const moviesFromFile = argv.moviesFile && await getFileEntries(argv.moviesFile); const moviesFromFile = argv.moviesFile && await getFileEntries(argv.moviesFile);
const movieUrls = (argv.movie || []).concat(moviesFromFile || []); const movieUrls = (argv.movie || []).concat(moviesFromFile || []);
const sceneMovies = deepScenes ? deepScenes.filter((scene) => scene.movie).map((scene) => ({ ...scene.movie, entity: scene.entity })) : []; const sceneMovies = deepScenes && argv.sceneMovies ? deepScenes.filter((scene) => scene.movie).map((scene) => ({ ...scene.movie, entity: scene.entity })) : [];
const deepMovies = argv.sceneMovies || argv.movie || movieUrls ? await fetchMovies([...movieUrls, ...(sceneMovies || []), ...[]]) : sceneMovies; const deepMovies = argv.sceneMovies || argv.movie || movieUrls ? await fetchMovies([...movieUrls, ...(sceneMovies || []), ...[]]) : sceneMovies;
const movieScenes = argv.movieScenes ? deepMovies.map((movie) => movie.scenes?.map((scene) => ({ ...scene, movie, entity: movie.entity }))).flat().filter(Boolean) : []; const movieScenes = argv.movieScenes ? deepMovies.map((movie) => movie.scenes?.map((scene) => ({ ...scene, movie, entity: movie.entity }))).flat().filter(Boolean) : [];