Fixed unmatched censored tags.
This commit is contained in:
@@ -140,6 +140,11 @@ const tags = [
|
|||||||
slug: 'asian',
|
slug: 'asian',
|
||||||
group: 'ethnicity',
|
group: 'ethnicity',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'ass',
|
||||||
|
slug: 'ass',
|
||||||
|
group: 'body',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'athletic',
|
name: 'athletic',
|
||||||
slug: '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).',
|
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',
|
group: 'oral',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
slug: 'oral',
|
||||||
|
name: 'oral',
|
||||||
|
group: 'oral',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'blowbang',
|
name: 'blowbang',
|
||||||
slug: 'blowbang',
|
slug: 'blowbang',
|
||||||
@@ -368,6 +378,10 @@ const tags = [
|
|||||||
name: 'cuckold',
|
name: 'cuckold',
|
||||||
slug: 'cuckold',
|
slug: 'cuckold',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'cum',
|
||||||
|
slug: 'cum',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'cum drunk',
|
name: 'cum drunk',
|
||||||
slug: 'cum-drunk',
|
slug: 'cum-drunk',
|
||||||
@@ -1168,6 +1182,11 @@ const tags = [
|
|||||||
slug: 'threesome',
|
slug: 'threesome',
|
||||||
group: 'group',
|
group: 'group',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'foursome',
|
||||||
|
slug: 'foursome',
|
||||||
|
group: 'group',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'throatpie',
|
name: 'throatpie',
|
||||||
slug: 'throatpie',
|
slug: 'throatpie',
|
||||||
@@ -2835,7 +2854,7 @@ const aliases = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'amateur b--w--bs',
|
name: 'amateur b--w--bs',
|
||||||
for: 'amateur blowjobs',
|
for: 'blowjob',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'a--l',
|
name: 'a--l',
|
||||||
@@ -2987,7 +3006,7 @@ const aliases = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'r----b',
|
name: 'r----b',
|
||||||
for: 'rimjob',
|
for: 'ass-eating',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 's--n--r',
|
name: 's--n--r',
|
||||||
@@ -3082,12 +3101,18 @@ exports.seed = (knex) => Promise.resolve()
|
|||||||
const tagEntries = await knex('tags').select('*').where({ alias_for: null });
|
const tagEntries = await knex('tags').select('*').where({ alias_for: null });
|
||||||
const tagsMap = tagEntries.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
const tagsMap = tagEntries.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||||
|
|
||||||
const tagAliases = aliases.map((alias) => ({
|
const tagAliases = aliases.map((alias) => {
|
||||||
|
if (!tagsMap[alias.for]) {
|
||||||
|
console.log(`UNMATCHED ALIAS: ${alias.name} -> ${alias.for}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
name: alias.name,
|
name: alias.name,
|
||||||
alias_for: tagsMap[alias.for],
|
alias_for: tagsMap[alias.for],
|
||||||
implied_tag_ids: alias.implies?.map((slug) => tagsMap[slug]),
|
implied_tag_ids: alias.implies?.map((slug) => tagsMap[slug]),
|
||||||
secondary: !!alias.secondary,
|
secondary: !!alias.secondary,
|
||||||
}));
|
};
|
||||||
|
});
|
||||||
|
|
||||||
return upsert('tags', tagAliases, 'name');
|
return upsert('tags', tagAliases, 'name');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ function withRelations(queryBuilder, withMedia) {
|
|||||||
|
|
||||||
async function matchTags(rawTags) {
|
async function matchTags(rawTags) {
|
||||||
const tags = 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);
|
.filter(Boolean);
|
||||||
|
|
||||||
const tagEntries = await knex('tags')
|
const tagEntries = await knex('tags')
|
||||||
|
|||||||
Reference in New Issue
Block a user