Compare commits
2 Commits
6ed02933a6
...
e6de8f0f9a
Author | SHA1 | Date |
---|---|---|
|
e6de8f0f9a | |
|
cc83b832f1 |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.145.1",
|
"version": "1.145.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.145.1",
|
"version": "1.145.2",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -290,7 +290,7 @@ function curateProfileEntry(profile) {
|
||||||
return curatedProfileEntry;
|
return curatedProfileEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function curateProfile(profile) {
|
async function curateProfile(profile, actor) {
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -404,7 +404,18 @@ async function curateProfile(profile) {
|
||||||
}).filter(Boolean)
|
}).filter(Boolean)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
curatedProfile.scenes = toBaseReleases(profile.scenes || profile.releases, profile.entity);
|
curatedProfile.scenes = toBaseReleases(profile.scenes || profile.releases, profile.entity, actor)
|
||||||
|
// attach actor to base scene, in case it was not scraped
|
||||||
|
.map((scene) => {
|
||||||
|
if (actor && !scene.actors?.find(sceneActor => slugify(sceneActor) === actor.slug || slugify(sceneActor.name) === actor.slug)) {
|
||||||
|
return {
|
||||||
|
...scene,
|
||||||
|
actors: [actor, ...(scene.actors || [])],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return scene;
|
||||||
|
});
|
||||||
|
|
||||||
if (profile.ethnicity && !curatedProfile.ethnicity) logger.warn(`Unrecognized ethnicity returned by '${profile.entity.name}' scraper: ${profile.ethnicity}`);
|
if (profile.ethnicity && !curatedProfile.ethnicity) logger.warn(`Unrecognized ethnicity returned by '${profile.entity.name}' scraper: ${profile.ethnicity}`);
|
||||||
if ((profile.hairColor || profile.hair) && !curatedProfile.hairColor) logger.warn(`Unrecognized hair color returned by '${profile.entity.name}' scraper: ${profile.hairColor || profile.hair}`);
|
if ((profile.hairColor || profile.hair) && !curatedProfile.hairColor) logger.warn(`Unrecognized hair color returned by '${profile.entity.name}' scraper: ${profile.hairColor || profile.hair}`);
|
||||||
|
@ -617,7 +628,7 @@ async function scrapeProfiles(actor, sources, entitiesBySlug, existingProfilesBy
|
||||||
...profile,
|
...profile,
|
||||||
entity,
|
entity,
|
||||||
update: existingProfile?.id || false,
|
update: existingProfile?.id || false,
|
||||||
});
|
}, actor);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code !== 'PROFILE_NOT_AVAILABLE') {
|
if (error.code !== 'PROFILE_NOT_AVAILABLE') {
|
||||||
logger.error(`Failed to fetch profile for '${actor.name}' from '${scraperSlug}': ${error.message}`);
|
logger.error(`Failed to fetch profile for '${actor.name}' from '${scraperSlug}': ${error.message}`);
|
||||||
|
|
Loading…
Reference in New Issue