Compare commits

...

6 Commits

Author SHA1 Message Date
DebaucheryLibrarian fe3f820d33 1.173.4 2021-02-24 02:43:39 +01:00
DebaucheryLibrarian fb2217a733 Preventing actor entry ID from being inserted without entity ID. 2021-02-24 02:43:34 +01:00
DebaucheryLibrarian af131f903e 1.173.3 2021-02-23 16:47:36 +01:00
DebaucheryLibrarian 736a15958a Fixed poster link in banner. 2021-02-23 16:47:34 +01:00
DebaucheryLibrarian ff862dbff9 Removed debug log. 2021-02-23 04:10:03 +01:00
DebaucheryLibrarian fae288633c Catching actor association errors so it does not inhibit media association. 2021-02-23 04:09:33 +01:00
57 changed files with 76 additions and 49 deletions

View File

@ -40,7 +40,7 @@
<a
v-if="release.poster"
v-tooltip="'View poster'"
:href="`${config.media.mediaPath}/${release.poster.path}`"
:href="getPath(release.poster)"
:class="{ playing }"
target="_blank"
rel="noopener noreferrer"

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "traxxx",
"version": "1.173.2",
"version": "1.173.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.173.2",
"version": "1.173.4",
"license": "ISC",
"dependencies": {
"@graphile-contrib/pg-order-by-related": "^1.0.0-beta.6",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.173.2",
"version": "1.173.4",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -9396,6 +9396,13 @@ const sites = [
tags: ['fake-cum', 'creampie', '4k'],
parent: 'whalemember',
},
{
name: 'Anal 4K',
slug: 'anal4k',
url: 'https://anal4k.com',
tags: ['anal', '4k'],
parent: 'whalemember',
},
{
name: 'Tiny 4K',
slug: 'tiny4k',

View File

@ -611,7 +611,7 @@ const tagPosters = [
['cum-on-butt', 0, 'Jynx Maze in "Don\'t Make Me Beg 4" for Evil Angel'],
['cum-on-boobs', 1, 'Kylie Page in "Melt In Your Mouth" for Twistys Hard'],
['cum-on-pussy', 0, 'Talinka A for Sex Art'],
['da-tp', 5, 'Venera Maxima in LegalPorno GIO1287'],
['da-tp', 7, 'Polly Petrova in LegalPorno YE069'],
['deepthroat', 2, 'Sarah Vandella for Throated'],
['dap', 7, 'Adriana Chechik in "DP Masters 6" for Jules Jordan'],
['double-blowjob', 1, 'Veronica Rodriguez and Penny Pax in "Fucking Older Guys 5" for Penthouse'],
@ -743,6 +743,7 @@ const tagPhotos = [
['cum-in-mouth', 0, 'Vina Sky and Avi Love for HardX'],
['cum-on-boobs', 0, 'Alessandra Jane for Private'],
['cum-on-boobs', 2, 'Blake Blossom in "Naturally Stacked Cutie" for HardX'],
['da-tp', 5, 'Venera Maxima in LegalPorno GIO1287'],
['da-tp', 6, 'Adriana Chechik in "Gangbang Me" for HardX'],
['da-tp', 0, 'Natasha Teen in LegalPorno SZ2164'],
['da-tp', 1, 'Francys Belle in SZ1702 for LegalPorno'],

View File

@ -24,7 +24,7 @@ const logger = require('./logger')(__filename);
const { toBaseReleases } = require('./deep');
const { associateAvatars, flushOrphanedMedia } = require('./media');
const { fetchEntitiesBySlug } = require('./entities');
const { fetchEntitiesBySlug, getRecursiveParent } = require('./entities');
const { deleteScenes } = require('./releases');
const slugify = require('./utils/slugify');
@ -159,11 +159,13 @@ function toBaseActors(actorsOrNames, release) {
const name = capitalize(baseName);
const slug = slugify(name);
const entity = getRecursiveParent(release?.entity);
const baseActor = {
name,
slug,
entryId: entryId || actorOrName.entryId || null,
entity: release?.entity?.parent || release?.entity || null,
entryId: entity && (entryId || actorOrName.entryId || null),
entity,
hasProfile: !!actorOrName.name, // actor contains profile information
};
@ -857,8 +859,6 @@ async function getOrCreateActors(baseActors, batchId) {
const uniqueBaseActors = baseActors.filter(baseActor => !existingActorSlugs[baseActor.entity.id]?.[baseActor.entryId]?.[baseActor.slug] && !existingActorSlugs.null?.null?.[baseActor.slug]);
const curatedActorEntries = curateActorEntries(uniqueBaseActors, batchId);
logger.error(curatedActorEntries);
const newActors = await bulkInsert('actors', curatedActorEntries);
const newActorIdsByEntityIdEntryIdAndSlug = newActors.reduce((acc, actor) => ({
@ -891,55 +891,61 @@ async function getOrCreateActors(baseActors, batchId) {
}
async function associateActors(releases, batchId) {
const baseActorsByReleaseId = releases.reduce((acc, release) => {
if (release.actors) {
acc[release.id] = toBaseActors(release.actors, release);
try {
const baseActorsByReleaseId = releases.reduce((acc, release) => {
if (release.actors) {
acc[release.id] = toBaseActors(release.actors, release);
}
return acc;
}, {});
const baseActors = Object.values(baseActorsByReleaseId).flat();
if (baseActors.length === 0) {
return [];
}
return acc;
}, {});
const baseActorsBySlug = baseActors.reduce((acc, baseActor) => ({
...acc,
[baseActor.slug]: baseActor,
}), {});
const baseActors = Object.values(baseActorsByReleaseId).flat();
const uniqueBaseActors = Object.values(baseActorsBySlug);
const actors = await getOrCreateActors(uniqueBaseActors, batchId);
if (baseActors.length === 0) {
return [];
}
const baseActorsBySlug = baseActors.reduce((acc, baseActor) => ({
...acc,
[baseActor.slug]: baseActor,
}), {});
const uniqueBaseActors = Object.values(baseActorsBySlug);
const actors = await getOrCreateActors(uniqueBaseActors, batchId);
const actorIdsByEntityIdEntryIdAndSlug = actors.reduce((acc, actor) => ({
...acc,
[actor.entity_id]: {
...acc[actor.entity_id],
[actor.entry_id]: {
...acc[actor.entity_id]?.[actor.entry_id],
[actor.slug]: {
actor_id: actor.alias_for || actor.id,
alias_id: actor.alias_for ? actor.id : null,
const actorIdsByEntityIdEntryIdAndSlug = actors.reduce((acc, actor) => ({
...acc,
[actor.entity_id]: {
...acc[actor.entity_id],
[actor.entry_id]: {
...acc[actor.entity_id]?.[actor.entry_id],
[actor.slug]: {
actor_id: actor.alias_for || actor.id,
alias_id: actor.alias_for ? actor.id : null,
},
},
},
},
}), {});
}), {});
const releaseActorAssociations = Object.entries(baseActorsByReleaseId)
.map(([releaseId, releaseActors]) => releaseActors
.map(releaseActor => ({
release_id: releaseId,
...(actorIdsByEntityIdEntryIdAndSlug[releaseActor.entity?.id]?.[releaseActor.entryId]?.[releaseActor.slug] || actorIdsByEntityIdEntryIdAndSlug.null.null[releaseActor.slug]),
})))
.flat();
const releaseActorAssociations = Object.entries(baseActorsByReleaseId)
.map(([releaseId, releaseActors]) => releaseActors
.map(releaseActor => ({
release_id: releaseId,
...(actorIdsByEntityIdEntryIdAndSlug[releaseActor.entity?.id]?.[releaseActor.entryId]?.[releaseActor.slug] || actorIdsByEntityIdEntryIdAndSlug.null.null[releaseActor.slug]),
})))
.flat();
await bulkInsert('releases_actors', releaseActorAssociations, false);
await bulkInsert('releases_actors', releaseActorAssociations, false);
logger.verbose(`Associated ${releaseActorAssociations.length} actors to ${releases.length} scenes`);
logger.verbose(`Associated ${releaseActorAssociations.length} actors to ${releases.length} scenes`);
return actors;
return actors;
} catch (error) {
logger.error(`Failed to associate actors: ${error.message}`);
return [];
}
}
async function fetchActor(actorId) {

View File

@ -9,6 +9,18 @@ const knex = require('./knex');
const { deleteScenes, deleteMovies } = require('./releases');
const { flushOrphanedMedia } = require('./media');
function getRecursiveParent(entity) {
if (!entity) {
return null;
}
if (entity.parent) {
return getRecursiveParent(entity.parent);
}
return entity;
}
function curateEntity(entity, includeParameters = false) {
if (!entity) {
return null;
@ -377,6 +389,7 @@ module.exports = {
fetchEntitiesBySlug,
fetchEntity,
fetchEntities,
getRecursiveParent,
searchEntities,
flushEntities,
urlToSiteSlug,