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(); await updateReleasesSearch();
} }
if (argv.actors) { const actors = argv.actors && await scrapeActors(argv.actors);
const actors = await scrapeActors(argv.actors); const actorBaseScenes = argv.actors && argv.actorScenes && actors.map(actor => actor.releases).flat().filter(Boolean);
if (argv.actorScenes) {
const actorReleases = actors.map(actor => actor.releases).flat().filter(Boolean);
await storeReleases(actorReleases);
}
}
const updateBaseScenes = (argv.scrape || argv.sites || argv.networks) && await fetchUpdates(); const updateBaseScenes = (argv.scrape || argv.sites || argv.networks) && await fetchUpdates();
const deepScenes = argv.deep const deepScenes = argv.deep
? await fetchScenes([...(argv.scenes || []), ...(updateBaseScenes || [])]) ? await fetchScenes([...(argv.scenes || []), ...(updateBaseScenes || []), ...(actorBaseScenes || [])])
: updateBaseScenes; : updateBaseScenes;
const sceneMovies = deepScenes && argv.sceneMovies && deepScenes.map(scene => scene.movie).filter(Boolean); const sceneMovies = deepScenes && argv.sceneMovies && deepScenes.map(scene => scene.movie).filter(Boolean);