Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 8b0b340031 1.237.15 2024-05-31 04:36:51 +02:00
DebaucheryLibrarian 91bd0c42be Added showcase boolean to manticore scene CLI tool. 2024-05-31 04:36:47 +02:00
3 changed files with 14 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.237.14", "version": "1.237.15",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.237.14", "version": "1.237.15",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.458.0", "@aws-sdk/client-s3": "^3.458.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.237.14", "version": "1.237.15",
"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": {

View File

@ -33,11 +33,16 @@ async function fetchScenes() {
parents.name as network_name, 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 (actors.id, actors.name)) FILTER (WHERE actors.id IS NOT NULL), '[]') as actors,
COALESCE(JSON_AGG(DISTINCT (tags.id, tags.name, tags.priority, tags_aliases.name)) FILTER (WHERE tags.id IS NOT NULL), '[]') as tags, COALESCE(JSON_AGG(DISTINCT (tags.id, tags.name, tags.priority, tags_aliases.name)) FILTER (WHERE tags.id IS NOT NULL), '[]') as tags,
COALESCE(JSON_AGG(DISTINCT (movies.id)) FILTER (WHERE movies.id IS NOT NULL), '[]') as movies COALESCE(JSON_AGG(DISTINCT (movies.id)) FILTER (WHERE movies.id IS NOT NULL), '[]') as movies,
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 FROM releases
LEFT JOIN scenes_meta ON scenes_meta.scene_id = releases.id LEFT JOIN scenes_meta ON scenes_meta.scene_id = releases.id
LEFT JOIN entities ON releases.entity_id = entities.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 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_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_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 LEFT JOIN releases_tags AS local_tags ON local_tags.release_id = releases.id
@ -61,7 +66,10 @@ async function fetchScenes() {
parents.id, parents.id,
parents.name, parents.name,
parents.slug, parents.slug,
parents.alias; parents.alias,
entities.showcased,
parents.showcased,
studios.showcased;
`); `);
return scenes.rows; return scenes.rows;
@ -112,6 +120,7 @@ async function init() {
date: scene.date ? Math.round(scene.date.getTime() / 1000) : undefined, date: scene.date ? Math.round(scene.date.getTime() / 1000) : undefined,
created_at: Math.round(scene.created_at.getTime() / 1000), created_at: Math.round(scene.created_at.getTime() / 1000),
effective_date: Math.round((scene.date || 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, shoot_id: scene.shoot_id || undefined,
channel_id: scene.channel_id, channel_id: scene.channel_id,
channel_slug: scene.channel_slug, channel_slug: scene.channel_slug,