From d80ec2e6a680acbcb1aaaf9cb1341a39f6af744f Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sun, 27 Oct 2024 17:12:21 +0100 Subject: [PATCH] Fixed actor ID property for newly created profiles, should fix actor association failing. --- src/actors.js | 4 +--- src/app.js | 6 ++---- src/scrapers/scrapers.js | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/actors.js b/src/actors.js index 8ffc47a5..5aa7196e 100755 --- a/src/actors.js +++ b/src/actors.js @@ -850,7 +850,7 @@ async function getOrCreateActors(baseActors, batchId) { .filter((actor) => actor.hasProfile) .map((actor) => ({ ...actor, - id: newActorIdsByEntityIdEntryIdAndSlug[actor.entity?.id]?.[actor.entryId]?.[actor.slug] || newActorIdsByEntityIdEntryIdAndSlug.null?.null?.[actor.slug], + actorId: newActorIdsByEntityIdEntryIdAndSlug[actor.entity?.id]?.[actor.entryId]?.[actor.slug] || newActorIdsByEntityIdEntryIdAndSlug.null?.null?.[actor.slug], })) .filter((actor) => !!actor.id) .map((actor) => curateProfile(actor))); @@ -935,8 +935,6 @@ async function associatePeople(releases, batchId, type = 'actor') { return actors; } catch (error) { logger.error(`Failed to associate actors: ${error.message} ${error.stack}`); - logger.error(error); - console.log(error); return []; } diff --git a/src/app.js b/src/app.js index e2d04855..3a90760f 100755 --- a/src/app.js +++ b/src/app.js @@ -5,7 +5,7 @@ const startTime = new Date(); const config = require('config'); const util = require('util'); const unprint = require('unprint'); -// const log = require('why-is-node-running'); +const log = require('why-is-node-running'); const Inspector = require('inspector-api'); const fs = require('fs').promises; const { format, intervalToDuration } = require('date-fns'); @@ -41,7 +41,6 @@ unprint.options({ unprint.on('requestInit', (event) => logger.debug(`Unprint ${event.method} (${event.interval}ms/${event.concurrency}p) ${event.url}`)); unprint.on('requestError', (event) => logger.error(`Unprint failed ${event.method} ${event.url} (${event.status}): ${event.statusText}`)); -/* function logActive() { setTimeout(() => { log(); @@ -51,7 +50,6 @@ function logActive() { } }, typeof argv.logActive === 'number' ? argv.logActive : 60000); } -*/ async function snapshotMemory(trigger) { const profile = await inspector.heap.takeSnapshot(); @@ -113,7 +111,7 @@ async function init() { } if (argv.logActive) { - // logActive(); + logActive(); } if (argv.updateSearch) { diff --git a/src/scrapers/scrapers.js b/src/scrapers/scrapers.js index f76820b9..831b6794 100755 --- a/src/scrapers/scrapers.js +++ b/src/scrapers/scrapers.js @@ -194,6 +194,7 @@ const scrapers = { americanpornstar, analbbc: fullpornnetwork, analized: fullpornnetwork, + analonly: mikeadriano, analviolation: fullpornnetwork, angelogodshackoriginal, anilos: nubiles,