Fixed unmatched censored tags.

This commit is contained in:
DebaucheryLibrarian
2026-03-22 04:46:40 +01:00
parent ea289c2b49
commit ba2a5c2225
2 changed files with 34 additions and 9 deletions

View File

@@ -140,6 +140,11 @@ const tags = [
slug: 'asian',
group: 'ethnicity',
},
{
name: 'ass',
slug: 'ass',
group: 'body',
},
{
name: 'athletic',
slug: 'athletic',
@@ -276,6 +281,11 @@ const tags = [
description: 'Taking a dick in your mouth, sucking, licking and kissing it, often while giving a [handjob](/tag/handjob). You may slide it all the way [down your throat](/tag/deepthroat), or let them [fuck your face](/tag/facefucking).',
group: 'oral',
},
{
slug: 'oral',
name: 'oral',
group: 'oral',
},
{
name: 'blowbang',
slug: 'blowbang',
@@ -368,6 +378,10 @@ const tags = [
name: 'cuckold',
slug: 'cuckold',
},
{
name: 'cum',
slug: 'cum',
},
{
name: 'cum drunk',
slug: 'cum-drunk',
@@ -1168,6 +1182,11 @@ const tags = [
slug: 'threesome',
group: 'group',
},
{
name: 'foursome',
slug: 'foursome',
group: 'group',
},
{
name: 'throatpie',
slug: 'throatpie',
@@ -2835,7 +2854,7 @@ const aliases = [
},
{
name: 'amateur b--w--bs',
for: 'amateur blowjobs',
for: 'blowjob',
},
{
name: 'a--l',
@@ -2987,7 +3006,7 @@ const aliases = [
},
{
name: 'r----b',
for: 'rimjob',
for: 'ass-eating',
},
{
name: 's--n--r',
@@ -3082,12 +3101,18 @@ exports.seed = (knex) => Promise.resolve()
const tagEntries = await knex('tags').select('*').where({ alias_for: null });
const tagsMap = tagEntries.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
const tagAliases = aliases.map((alias) => ({
name: alias.name,
alias_for: tagsMap[alias.for],
implied_tag_ids: alias.implies?.map((slug) => tagsMap[slug]),
secondary: !!alias.secondary,
}));
const tagAliases = aliases.map((alias) => {
if (!tagsMap[alias.for]) {
console.log(`UNMATCHED ALIAS: ${alias.name} -> ${alias.for}`);
}
return {
name: alias.name,
alias_for: tagsMap[alias.for],
implied_tag_ids: alias.implies?.map((slug) => tagsMap[slug]),
secondary: !!alias.secondary,
};
});
return upsert('tags', tagAliases, 'name');
});

View File

@@ -80,7 +80,7 @@ function withRelations(queryBuilder, withMedia) {
async function matchTags(rawTags) {
const tags = rawTags
.map((tag) => tag?.trim().match(/[a-z0-9()]+/ig)?.join(' ').toLowerCase())
.map((tag) => tag?.trim().match(/[a-z0-9()-]+/ig)?.join(' ').toLowerCase())
.filter(Boolean);
const tagEntries = await knex('tags')