Updating Manticore scenes database on scene store.

This commit is contained in:
DebaucheryLibrarian
2024-01-25 01:15:42 +01:00
parent ae2d3591ee
commit 86ffcc3316
31 changed files with 237 additions and 27 deletions

View File

@@ -20,9 +20,10 @@ const update = args.update;
async function fetchActors() {
// manually select date of birth, otherwise it is retrieved in local timezone but interpreted as UTC...
const actors = await knex.raw(`
SELECT actors.*, date_of_birth AT TIME ZONE 'Europe/Amsterdam' AT TIME ZONE 'UTC' as dob
FROM actors
GROUP BY actors.id;
SELECT
actors_meta.*,
date_of_birth AT TIME ZONE 'Europe/Amsterdam' AT TIME ZONE 'UTC' as dob
FROM actors_meta;
`);
return actors.rows;
@@ -44,7 +45,9 @@ async function init() {
cup string,
natural_boobs int,
penis_length int,
penis_girth int
penis_girth int,
stashed int,
scenes int
)`);
const actors = await fetchActors();
@@ -66,6 +69,8 @@ async function init() {
natural_boobs: actor.natural_boobs === null ? 0 : Number(actor.natural_boobs) + 1, // manticore bool does not seem to support null, and we need three states for natural_boobs: yes, no and unknown
penis_length: actor.penis_length || undefined,
penis_girth: actor.penis_girth || undefined,
stashed: actor.stashed || 0,
scenes: actor.scenes || 0,
},
},
}));