Added actor scenes to deep fetch sources.

This commit is contained in:
ThePendulum 2020-05-20 03:03:42 +02:00
parent 7275fb10e3
commit 703b77897d
1 changed files with 3 additions and 10 deletions

View File

@ -21,20 +21,13 @@ async function init() {
await updateReleasesSearch();
}
if (argv.actors) {
const actors = await scrapeActors(argv.actors);
if (argv.actorScenes) {
const actorReleases = actors.map(actor => actor.releases).flat().filter(Boolean);
await storeReleases(actorReleases);
}
}
const actors = argv.actors && await scrapeActors(argv.actors);
const actorBaseScenes = argv.actors && argv.actorScenes && actors.map(actor => actor.releases).flat().filter(Boolean);
const updateBaseScenes = (argv.scrape || argv.sites || argv.networks) && await fetchUpdates();
const deepScenes = argv.deep
? await fetchScenes([...(argv.scenes || []), ...(updateBaseScenes || [])])
? await fetchScenes([...(argv.scenes || []), ...(updateBaseScenes || []), ...(actorBaseScenes || [])])
: updateBaseScenes;
const sceneMovies = deepScenes && argv.sceneMovies && deepScenes.map(scene => scene.movie).filter(Boolean);