Fixed tags module not dealing with empty releases or tags, added origin tag column to chapter tag table.
This commit is contained in:
parent
b1b2ad2111
commit
167df35d37
|
@ -1,7 +1,10 @@
|
|||
<template>
|
||||
<div class="tags">
|
||||
<div class="content-inner">
|
||||
<SearchBar :placeholder="'Search tags'" />
|
||||
<SearchBar
|
||||
:placeholder="'Search tags'"
|
||||
class="search"
|
||||
/>
|
||||
|
||||
<div
|
||||
v-for="(tags, category) in categories"
|
||||
|
@ -65,10 +68,9 @@ const tagSlugsByCategory = {
|
|||
'blowjob',
|
||||
'pussy-eating',
|
||||
'ass-eating',
|
||||
'69',
|
||||
'double-blowjob',
|
||||
'deepthroat',
|
||||
'facefucking',
|
||||
'69',
|
||||
'atm',
|
||||
],
|
||||
manual: [
|
||||
|
@ -89,7 +91,6 @@ const tagSlugsByCategory = {
|
|||
],
|
||||
cumshot: [
|
||||
'facial',
|
||||
'bukkake',
|
||||
'creampie',
|
||||
'cum-in-mouth',
|
||||
'cum-on-boobs',
|
||||
|
@ -97,6 +98,7 @@ const tagSlugsByCategory = {
|
|||
'cum-on-pussy',
|
||||
'anal-creampie',
|
||||
'oral-creampie',
|
||||
'bukkake',
|
||||
'fake-cum',
|
||||
],
|
||||
toys: [
|
||||
|
@ -226,19 +228,22 @@ export default {
|
|||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(20rem, .33fr));
|
||||
grid-gap: 1rem;
|
||||
margin: 0 0 1.5rem 0;
|
||||
}
|
||||
|
||||
.heading {
|
||||
text-transform: capitalize;
|
||||
padding: 0 0 0 .5rem;
|
||||
margin: 1.75rem 0 1rem 0;
|
||||
margin: 1.25rem 0 1rem 0;
|
||||
}
|
||||
|
||||
.category:first-child .heading {
|
||||
margin: .5rem 0 1rem 0;
|
||||
}
|
||||
|
||||
.search {
|
||||
margin: 0 0 .25rem 0;
|
||||
}
|
||||
|
||||
@media(max-width: $breakpoint3) {
|
||||
.tiles {
|
||||
grid-template-columns: repeat(auto-fill, minmax(18rem, .5fr));
|
||||
|
|
|
@ -986,7 +986,6 @@ exports.up = knex => Promise.resolve()
|
|||
}))
|
||||
.then(() => knex.schema.createTable('chapters_tags', (table) => {
|
||||
table.integer('tag_id', 12)
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('tags')
|
||||
.onDelete('cascade');
|
||||
|
@ -997,6 +996,8 @@ exports.up = knex => Promise.resolve()
|
|||
.inTable('chapters')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('original_tag');
|
||||
|
||||
table.unique(['tag_id', 'chapter_id']);
|
||||
}))
|
||||
.then(() => knex.schema.createTable('users_roles', (table) => {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
|
@ -836,6 +836,7 @@ const tagMedia = [
|
|||
['enhanced-boobs', 'trudy_photodromm_1', 'Trudy', 'photodromm'],
|
||||
['enhanced-boobs', 'kenzie_anne_playboy', 'Miss Kenzie Anne in "Supercharged"', 'playboy'],
|
||||
['enhanced-boobs', 'kelly_oliveira_teenfidelity', 'Kelly Oliveira in "Keep It Going"', 'teenfidelity'],
|
||||
['enhanced-boobs', 13, 'Kitana Lure', 'assholefever'],
|
||||
['enhanced-boobs', 9, 'Putri Cinta', 'watch4beauty'],
|
||||
['enhanced-boobs', 'alexis_zara_wildoncam', 'Alexis Zara', 'wildoncam'],
|
||||
['enhanced-boobs', 'diamond_foxxx_brazzers_1', 'Diamond Foxxx in "Big Cock Inheritor"', 'brazzers'],
|
||||
|
@ -857,7 +858,6 @@ const tagMedia = [
|
|||
['enhanced-boobs', 10, 'Tia Cyrus in "Titty-Fucked Yoga Goddess"', 'latinasextapes'],
|
||||
['enhanced-boobs', 24, 'Shalina Devine in "Rumbling in the Ring, Part 2"', 'pornworld'],
|
||||
['enhanced-boobs', 20, 'Chloe Lamour', 'ddfbusty'],
|
||||
['enhanced-boobs', 13, 'Kitana Lure', 'assholefever'],
|
||||
['enhanced-boobs', 8, 'Amber Alena', 'score'],
|
||||
['enhanced-boobs', 19, 'Kerrie Lee in "Bricked"', 'studio66tv'],
|
||||
['enhanced-boobs', 4, 'Capri Cavanni', 'bigtitsinsports'],
|
||||
|
|
|
@ -117,7 +117,7 @@ async function getEntityTags(releases) {
|
|||
function buildReleaseTagAssociations(releases, tagIdsBySlug, entityTagIdsByEntityId, type) {
|
||||
const tagAssociations = releases
|
||||
.map((release) => {
|
||||
const entityTagIds = entityTagIdsByEntityId[release.entity?.id].map(tag => ({ id: tag.id, origin: tag.name })) || [];
|
||||
const entityTagIds = entityTagIdsByEntityId[release.entity?.id]?.map(tag => ({ id: tag.id, origin: tag.name })) || [];
|
||||
const releaseTags = release.tags?.filter(Boolean) || [];
|
||||
|
||||
const releaseTagsWithIds = releaseTags.every(tag => typeof tag === 'number')
|
||||
|
@ -147,6 +147,10 @@ function buildReleaseTagAssociations(releases, tagIdsBySlug, entityTagIdsByEntit
|
|||
}
|
||||
|
||||
async function associateReleaseTags(releases, type = 'release') {
|
||||
if (releases.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tagIdsBySlug = await matchReleaseTags(releases);
|
||||
const EntityTagIdsByEntityId = await getEntityTags(releases);
|
||||
|
||||
|
|
Loading…
Reference in New Issue