From 66e007608342051b62cd9eb7168151885a5a2260 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 7 Jul 2026 03:40:19 +0200 Subject: [PATCH] Resolving aliased tag media. --- seeds/00_tags.js | 20 ++++++++++++++++++-- seeds/04_media.js | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/seeds/00_tags.js b/seeds/00_tags.js index e69b5f05..14c3fd6e 100755 --- a/seeds/00_tags.js +++ b/seeds/00_tags.js @@ -161,6 +161,7 @@ const tags = [ name: 'ass to other girl\'s mouth', slug: 'atogm', description: '[Ass to mouth](/tag/atm) with a cock that has been in someone else\'s ass. ATOGM may also be the gay variation "ass to other guy\'s mouth".', + implies: ['atm'], group: 'oral', }, { @@ -322,6 +323,10 @@ const tags = [ name: 'bondage', slug: 'bondage', }, + { + name: 'bimbo', + slug: 'bimbo', + }, { name: 'braces', slug: 'braces', @@ -557,6 +562,7 @@ const tags = [ { name: 'fake tits', slug: 'fake-tits', + description: 'Tasteful enhancements or massive bimbo bolt-ons, you don\'t mind a bit of plastic to get the boobs you\'ve always wanted.', rename: 'enhanced-boobs', }, { @@ -844,13 +850,18 @@ const tags = [ name: 'MFM threesome', slug: 'mfm', implies: ['threesome'], - description: 'Two men fucking one woman, but not eachother. Typically involves a \'spitroast\', where one guy gets a blowjob and the other fucks her pussy or ass.', + description: 'Two men fucking one woman, but not eachother. Typically involves a [spitroast](/tag/spitroast), where one guy gets a blowjob and the other fucks her pussy or ass.', group: 'group', }, { name: 'spitroast', slug: 'spitroast', }, + { + name: 'anal spitroast', + slug: 'anal-spitroast', + implies: ['anal', 'spitroast'], + }, { name: 'military', slug: 'military', @@ -3141,12 +3152,17 @@ exports.seed = (knex) => Promise.resolve() await Promise.all(tags.map((async (tag) => { if (tag.rename) { await knex('tags') - .where('name', tag.name) + .where((builder) => { + builder + .where('slug', tag.slug) + .orWhere('name', tag.name); + }) .whereNotNull('alias_for') .delete(); await knex('tags') .where('slug', tag.rename) + .whereNull('alias_for') .update({ name: tag.name, slug: tag.slug, diff --git a/seeds/04_media.js b/seeds/04_media.js index f1da058d..01a5b01c 100755 --- a/seeds/04_media.js +++ b/seeds/04_media.js @@ -1144,7 +1144,7 @@ exports.seed = (knex) => Promise.resolve() entity_id: entitiesBySlug[media.entitySlug]?.id, })), 'path', knex); - const tagIdsBySlug = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag.id }), {}); + const tagIdsBySlug = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag.alias_for || tag.id }), {}); const mediaIdsByPath = inserted.concat(updated).reduce((acc, item) => ({ ...acc, [item.path]: item.id }), {}); const tagMediaBySlug = tagMedia.reduce((acc, tagPhoto) => ({