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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user