Added showcase to manticore migration. Added Cheating Sis to Nubiles.
This commit is contained in:
parent
b932cc0c6c
commit
05d78d948b
|
@ -7,7 +7,8 @@ data/
|
|||
tmp/*
|
||||
public/js/*
|
||||
public/css/*
|
||||
public/img/tags/
|
||||
public/img/tags
|
||||
public/img/logos/
|
||||
config/*
|
||||
!config/default.js
|
||||
assets/js/config/
|
||||
|
|
|
@ -24,6 +24,7 @@ const scenesFields = `
|
|||
tags text,
|
||||
meta text,
|
||||
date timestamp,
|
||||
is_showcased bool,
|
||||
created_at timestamp,
|
||||
effective_date timestamp,
|
||||
stashed int
|
||||
|
@ -72,42 +73,41 @@ const actorsFields = `
|
|||
`;
|
||||
|
||||
exports.up = async (knex) => {
|
||||
await utilsApi.sql(`create table scenes (${scenesFields})`);
|
||||
try {
|
||||
await utilsApi.sql(`create table scenes (${scenesFields})`);
|
||||
|
||||
/*
|
||||
await utilsApi.sql(`create table scenes_stashed (
|
||||
${scenesFields},
|
||||
user_id int,
|
||||
stash_id int
|
||||
)`);
|
||||
*/
|
||||
await utilsApi.sql(`create table scenes_stashed (
|
||||
scene_id int,
|
||||
stash_id int,
|
||||
user_id int,
|
||||
created_at timestamp
|
||||
)`);
|
||||
|
||||
await utilsApi.sql(`create table scenes_stashed (
|
||||
scene_id int,
|
||||
stash_id int,
|
||||
user_id int
|
||||
)`);
|
||||
await utilsApi.sql(`create table movies (${moviesFields})`);
|
||||
|
||||
await utilsApi.sql(`create table movies (${moviesFields})`);
|
||||
await utilsApi.sql(`create table movies_stashed (
|
||||
movie_id int,
|
||||
stash_id int,
|
||||
user_id int,
|
||||
created_at timestamp
|
||||
)`);
|
||||
|
||||
await utilsApi.sql(`create table movies_stashed (
|
||||
${moviesFields},
|
||||
user_id int,
|
||||
stash_id int
|
||||
)`);
|
||||
await utilsApi.sql(`create table actors (${actorsFields})`);
|
||||
|
||||
await utilsApi.sql(`create table actors (${actorsFields})`);
|
||||
await utilsApi.sql(`create table actors_stashed (
|
||||
actor_id int,
|
||||
stash_id int,
|
||||
user_id int,
|
||||
created_at timestamp
|
||||
)`);
|
||||
|
||||
await utilsApi.sql(`create table actors_stashed (
|
||||
${actorsFields},
|
||||
user_id int,
|
||||
stash_id int
|
||||
)`);
|
||||
|
||||
await knex.schema.alterTable('stashes_scenes', (table) => table.increments('id'));
|
||||
await knex.schema.alterTable('stashes_movies', (table) => table.increments('id'));
|
||||
await knex.schema.alterTable('stashes_actors', (table) => table.increments('id'));
|
||||
await knex.schema.alterTable('stashes_series', (table) => table.increments('id'));
|
||||
await knex.schema.alterTable('stashes_scenes', (table) => table.increments('id'));
|
||||
await knex.schema.alterTable('stashes_movies', (table) => table.increments('id'));
|
||||
await knex.schema.alterTable('stashes_actors', (table) => table.increments('id'));
|
||||
await knex.schema.alterTable('stashes_series', (table) => table.increments('id'));
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
};
|
||||
|
||||
exports.down = async (knex) => {
|
||||
|
|
|
@ -307,6 +307,10 @@ const tags = [
|
|||
name: 'casting',
|
||||
slug: 'casting',
|
||||
},
|
||||
{
|
||||
name: 'cheating',
|
||||
slug: 'cheating',
|
||||
},
|
||||
{
|
||||
name: 'cheerleader',
|
||||
slug: 'cheerleader',
|
||||
|
@ -2441,6 +2445,10 @@ const aliases = [
|
|||
for: 'gangbang',
|
||||
implies: ['anal'],
|
||||
},
|
||||
{
|
||||
name: 'cheat',
|
||||
for: 'cheating',
|
||||
},
|
||||
];
|
||||
|
||||
const priorities = [ // higher index is higher priority
|
||||
|
|
|
@ -7904,6 +7904,13 @@ const sites = [
|
|||
tags: ['family'],
|
||||
parent: 'nubiles',
|
||||
},
|
||||
{
|
||||
slug: 'cheatingsis',
|
||||
name: 'Cheating Sis',
|
||||
url: 'https://www.cheatingsis.com',
|
||||
tags: ['cheating', 'family'],
|
||||
parent: 'nubiles',
|
||||
},
|
||||
// PASCALS SUBSLUTS
|
||||
{
|
||||
slug: 'pascalssubsluts',
|
||||
|
|
|
@ -18,7 +18,7 @@ async function updateManticoreStashedScenes(docs) {
|
|||
const sceneIds = docsChunk.map((doc) => doc.replace.id);
|
||||
|
||||
const stashes = await knex('stashes_scenes')
|
||||
.select('stashes_scenes.id as stashed_id', 'stashes_scenes.scene_id', 'stashes.id as stash_id', 'stashes.user_id as user_id')
|
||||
.select('stashes_scenes.id as stashed_id', 'stashes_scenes.scene_id', 'stashes_scenes.created_at', 'stashes.id as stash_id', 'stashes.user_id as user_id')
|
||||
.leftJoin('stashes', 'stashes.id', 'stashes_scenes.stash_id')
|
||||
.whereIn('scene_id', sceneIds);
|
||||
|
||||
|
@ -38,6 +38,7 @@ async function updateManticoreStashedScenes(docs) {
|
|||
scene_id: doc.replace.id,
|
||||
user_id: stash.user_id,
|
||||
stash_id: stash.stash_id,
|
||||
created_at: Math.round(stash.created_at.getTime() / 1000),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
@ -69,11 +70,16 @@ async function updateManticoreSceneSearch(releaseIds) {
|
|||
parents.slug as network_slug,
|
||||
parents.name as network_name,
|
||||
COALESCE(JSON_AGG(DISTINCT (actors.id, actors.name)) FILTER (WHERE actors.id IS NOT NULL), '[]') as actors,
|
||||
COALESCE(JSON_AGG(DISTINCT (tags.id, tags.name, tags.priority)) FILTER (WHERE tags.id IS NOT NULL), '[]') as tags
|
||||
COALESCE(JSON_AGG(DISTINCT (tags.id, tags.name, tags.priority)) FILTER (WHERE tags.id IS NOT NULL), '[]') as tags,
|
||||
studios.showcased IS NOT false
|
||||
AND (entities.showcased IS NOT false OR COALESCE(studios.showcased, false) = true)
|
||||
AND (parents.showcased IS NOT false OR COALESCE(entities.showcased, false) = true OR COALESCE(studios.showcased, false) = true)
|
||||
AS showcased
|
||||
FROM releases
|
||||
LEFT JOIN scenes_meta ON scenes_meta.scene_id = releases.id
|
||||
LEFT JOIN entities ON releases.entity_id = entities.id
|
||||
LEFT JOIN entities AS parents ON parents.id = entities.parent_id
|
||||
LEFT JOIN entities AS studios ON studios.id = releases.studio_id
|
||||
LEFT JOIN releases_actors AS local_actors ON local_actors.release_id = releases.id
|
||||
LEFT JOIN releases_directors AS local_directors ON local_directors.release_id = releases.id
|
||||
LEFT JOIN releases_tags AS local_tags ON local_tags.release_id = releases.id
|
||||
|
@ -93,12 +99,17 @@ async function updateManticoreSceneSearch(releaseIds) {
|
|||
entities.name,
|
||||
entities.slug,
|
||||
entities.alias,
|
||||
entities.showcased,
|
||||
parents.id,
|
||||
parents.name,
|
||||
parents.slug,
|
||||
parents.alias;
|
||||
parents.alias,
|
||||
parents.showcased,
|
||||
studios.showcased
|
||||
`, releaseIds && [releaseIds]);
|
||||
|
||||
// console.log(scenes.rows);
|
||||
|
||||
const docs = scenes.rows.map((scene) => {
|
||||
const flatActors = scene.actors.flatMap((actor) => actor.f2.split(' '));
|
||||
const flatTags = scene.tags.filter((tag) => tag.f3 > 6).flatMap((tag) => tag.f2.split(' ')); // only make top tags searchable to minimize cluttered results
|
||||
|
@ -114,6 +125,7 @@ async function updateManticoreSceneSearch(releaseIds) {
|
|||
date: scene.date ? Math.round(scene.date.getTime() / 1000) : undefined,
|
||||
created_at: Math.round(scene.created_at.getTime() / 1000),
|
||||
effective_date: Math.round((scene.date || scene.created_at).getTime() / 1000),
|
||||
is_showcased: scene.showcased,
|
||||
shoot_id: scene.shoot_id || undefined,
|
||||
channel_id: scene.channel_id,
|
||||
channel_slug: scene.channel_slug,
|
||||
|
|
Loading…
Reference in New Issue