Fixed actor ID property for newly created profiles, should fix actor association failing.

This commit is contained in:
DebaucheryLibrarian 2024-10-27 17:12:21 +01:00
parent 707c8170bd
commit d80ec2e6a6
3 changed files with 4 additions and 7 deletions

View File

@ -850,7 +850,7 @@ async function getOrCreateActors(baseActors, batchId) {
.filter((actor) => actor.hasProfile) .filter((actor) => actor.hasProfile)
.map((actor) => ({ .map((actor) => ({
...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) .filter((actor) => !!actor.id)
.map((actor) => curateProfile(actor))); .map((actor) => curateProfile(actor)));
@ -935,8 +935,6 @@ async function associatePeople(releases, batchId, type = 'actor') {
return actors; return actors;
} catch (error) { } catch (error) {
logger.error(`Failed to associate actors: ${error.message} ${error.stack}`); logger.error(`Failed to associate actors: ${error.message} ${error.stack}`);
logger.error(error);
console.log(error);
return []; return [];
} }

View File

@ -5,7 +5,7 @@ const startTime = new Date();
const config = require('config'); const config = require('config');
const util = require('util'); const util = require('util');
const unprint = require('unprint'); const unprint = require('unprint');
// const log = require('why-is-node-running'); const log = require('why-is-node-running');
const Inspector = require('inspector-api'); const Inspector = require('inspector-api');
const fs = require('fs').promises; const fs = require('fs').promises;
const { format, intervalToDuration } = require('date-fns'); 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('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}`)); unprint.on('requestError', (event) => logger.error(`Unprint failed ${event.method} ${event.url} (${event.status}): ${event.statusText}`));
/*
function logActive() { function logActive() {
setTimeout(() => { setTimeout(() => {
log(); log();
@ -51,7 +50,6 @@ function logActive() {
} }
}, typeof argv.logActive === 'number' ? argv.logActive : 60000); }, typeof argv.logActive === 'number' ? argv.logActive : 60000);
} }
*/
async function snapshotMemory(trigger) { async function snapshotMemory(trigger) {
const profile = await inspector.heap.takeSnapshot(); const profile = await inspector.heap.takeSnapshot();
@ -113,7 +111,7 @@ async function init() {
} }
if (argv.logActive) { if (argv.logActive) {
// logActive(); logActive();
} }
if (argv.updateSearch) { if (argv.updateSearch) {

View File

@ -194,6 +194,7 @@ const scrapers = {
americanpornstar, americanpornstar,
analbbc: fullpornnetwork, analbbc: fullpornnetwork,
analized: fullpornnetwork, analized: fullpornnetwork,
analonly: mikeadriano,
analviolation: fullpornnetwork, analviolation: fullpornnetwork,
angelogodshackoriginal, angelogodshackoriginal,
anilos: nubiles, anilos: nubiles,