From 0beb54312a8842f00c9b1225b32477e455ea873e Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 16 Mar 2026 04:58:46 +0100 Subject: [PATCH] Updating Manticore scenes after tag reassociation. --- seeds/00_tags.js | 2 +- src/tags.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/seeds/00_tags.js b/seeds/00_tags.js index 88390d08..5209f005 100755 --- a/seeds/00_tags.js +++ b/seeds/00_tags.js @@ -3026,7 +3026,7 @@ const priorities = [ // higher index is higher priority ['facial', 'swallowing', 'creampie', 'anal-creampie', 'oral-creampie', 'cum-in-mouth', 'throatpie'], ['lesbian', 'rough', 'milf', 'male-focus', 'bdsm', 'oil'], ['threesome', 'mfm', 'mff', 'trainbang', 'pissing'], - ['anal', 'bukkake'], + ['anal', 'bukkake', 'spitroast'], ['dp', 'dap', 'triple-penetration', 'tap', 'dvp', 'tvp', 'airtight'], ['blowbang', 'orgy'], ['gangbang'], diff --git a/src/tags.js b/src/tags.js index 0323c485..6afac349 100755 --- a/src/tags.js +++ b/src/tags.js @@ -4,6 +4,7 @@ const logger = require('./logger')(__filename); const knex = require('./knex'); const { fetchEntityReleaseIds } = require('./entities'); +const { updateSceneSearch } = require('./update-search'); const slugify = require('./utils/slugify'); const batchInsert = require('./utils/batch-insert'); @@ -199,6 +200,8 @@ async function reassociateTagEntries(tagEntries, rematch) { tag_id: matchedTags[slugify(tagEntry.original_tag)], })).filter((tagEntry) => tagEntry.tag_id); + const sceneIds = Array.from(new Set(updatedTagEntries.map((tagEntry) => tagEntry.release_id))).filter(Boolean); + if (updatedTagEntries.length > 0) { const trx = await knex.transaction(); @@ -212,10 +215,13 @@ async function reassociateTagEntries(tagEntries, rematch) { })), { conflict: false, transaction: trx, + commit: true, }); + + await updateSceneSearch(sceneIds); } - logger.info(`Updated ${updatedTagEntries.length} tags in ${new Set(updatedTagEntries.map((tagEntry) => tagEntry.release_id)).size} scenes`); + logger.info(`Updated ${updatedTagEntries.length} tags in ${sceneIds.length} scenes`); } async function reassociateReleaseTags(rawSceneIds, rematch) {