Not storing shallow movie data when argument is disabled.
This commit is contained in:
parent
36d84fb98b
commit
ceaf5a3217
|
@ -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) : [];
|
||||||
|
|
Loading…
Reference in New Issue