Better handling of empty profiles. Modified Score scraper for Big Tit Terry Nova. Improved Naughty America and various other logos.

This commit is contained in:
2020-02-05 01:41:30 +01:00
parent aa7dca65d1
commit 38bab672d4
47 changed files with 17 additions and 16 deletions

View File

@@ -275,6 +275,10 @@ async function updateActor(actor, scraped = false, scrapeSuccess = false) {
}
async function mergeProfiles(profiles, actor) {
if (profiles.filter(Boolean).length === 0) {
return null;
}
const mergedProfile = profiles.reduce((prevProfile, profile) => {
if (profile === null) {
return prevProfile;
@@ -379,8 +383,8 @@ async function scrapeActors(actorNames) {
if (profile === null) {
logger.warn(`Could not find profile for actor '${actorName}'`);
if (argv.save) {
await updateActor(profile, true, false);
if (argv.save && !actorEntry) {
await storeActor({ name: actorName }, false, false);
}
return null;