Compare commits
No commits in common. "2e64965fe5f90980121d32dac01c227a376eded5" and "2052af79778fca0c27a2a26421e16a5183fb34ad" have entirely different histories.
2e64965fe5
...
2052af7977
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.244.81",
|
||||
"version": "1.244.80",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "traxxx",
|
||||
"version": "1.244.81",
|
||||
"version": "1.244.80",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.458.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.244.81",
|
||||
"version": "1.244.80",
|
||||
"description": "All the latest porn releases in one place",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -202,10 +202,6 @@ const tags = [
|
|||
name: 'behind the scenes',
|
||||
slug: 'bts',
|
||||
},
|
||||
{
|
||||
name: 'BTS available',
|
||||
slug: 'hasbts',
|
||||
},
|
||||
{
|
||||
name: 'belgian',
|
||||
slug: 'belgian',
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ function scrapeSceneApi(data, channel, parameters) {
|
|||
}));
|
||||
}
|
||||
|
||||
// BTS category is used to indicate the scene has a BTS video available, not that it itself is a BTS
|
||||
release.tags = data.categories.map((category) => (category.name.toLowerCase() === 'bts' ? 'bts available' : category.name));
|
||||
release.tags = data.categories.map((category) => category.name);
|
||||
release.photoCount = data.photosetPhotoCount || data.episode_photoset_photo_count;
|
||||
|
||||
return release;
|
||||
|
|
|
|||
11
src/tags.js
11
src/tags.js
|
|
@ -74,14 +74,19 @@ function withRelations(queryBuilder, withMedia) {
|
|||
}
|
||||
|
||||
async function matchReleaseTags(releases) {
|
||||
const tags = releases
|
||||
const rawTags = releases
|
||||
.map((release) => release.tags).flat()
|
||||
.map((tag) => tag.trim().toLowerCase())
|
||||
.filter(Boolean);
|
||||
|
||||
const casedTags = [...new Set(
|
||||
rawTags
|
||||
.concat(rawTags.map((tag) => tag.trim().toLowerCase()))
|
||||
.concat(rawTags.map((tag) => tag.trim().toUpperCase())),
|
||||
)];
|
||||
|
||||
const tagEntries = await knex('tags')
|
||||
.select('tags.id', 'tags.name', 'tags.alias_for', 'tags.implied_tag_ids')
|
||||
.whereIn(knex.raw('lower(tags.name)'), tags);
|
||||
.whereIn('tags.name', casedTags);
|
||||
|
||||
const tagIdsBySlug = tagEntries
|
||||
.reduce((acc, tag) => ({
|
||||
|
|
|
|||
Loading…
Reference in New Issue