From 52d041c59164d466024ce17f042b017baf583fd2 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 29 Jan 2026 04:45:38 +0100 Subject: [PATCH] Retired visitor database connection. Fixed empty traxxx breaking on missing batch IDs. --- config/default.cjs | 5 +---- src/knex.js | 11 ++--------- src/scenes.js | 4 ++-- static | 2 +- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/config/default.cjs b/config/default.cjs index 0b81206..0d50c44 100755 --- a/config/default.cjs +++ b/config/default.cjs @@ -104,9 +104,6 @@ module.exports = { assetPath: '/img', mediaPath: '/media', s3Path: 'https://s3.wasabisys.com', - videoRestrictions: [ // entity slugs - '_kink', - '_kinkmen', - ], + videoRestrictions: [], // entity slugs, _ prefix for networks, hides trailer and teaser videos }, }; diff --git a/src/knex.js b/src/knex.js index 167bc25..a14bae6 100755 --- a/src/knex.js +++ b/src/knex.js @@ -1,15 +1,6 @@ import config from 'config'; import knex from 'knex'; -export const knexQuery = knex({ - client: 'pg', - connection: config.database.query, - pool: config.database.pool, - // performance overhead, don't use asyncStackTraces in production - asyncStackTraces: process.env.NODE_ENV === 'development', - // debug: process.env.NODE_ENV === 'development', -}); - export const knexOwner = knex({ client: 'pg', connection: config.database.owner, @@ -19,6 +10,8 @@ export const knexOwner = knex({ // debug: process.env.NODE_ENV === 'development', }); +export const knexQuery = knexOwner; // legacy + export const knexManticore = knex({ client: 'mysql', connection: { diff --git a/src/scenes.js b/src/scenes.js index d4d7921..00894a0 100644 --- a/src/scenes.js +++ b/src/scenes.js @@ -153,7 +153,7 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) { teasers, fingerprints, stashes, - lastBatch: { id: lastBatchId }, + lastBatch, } = await promiseProps({ scenes: knex('releases').whereIn('releases.id', sceneIds), channels: knex('releases') @@ -348,7 +348,7 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) { fingerprints: sceneFingerprints, stashes: sceneStashes, actorStashes: sceneActorStashes, - lastBatchId, + lastBatchId: lastBatch?.id, }, reqUser); }).filter(Boolean); } diff --git a/static b/static index 2af6f58..c8ee47e 160000 --- a/static +++ b/static @@ -1 +1 @@ -Subproject commit 2af6f58ca1cd9421515ad0d0ffd5adb1c781adeb +Subproject commit c8ee47e1815757c1a2a8db725c1550efc0edb04e