Compare commits

..

No commits in common. "2e64965fe5f90980121d32dac01c227a376eded5" and "2052af79778fca0c27a2a26421e16a5183fb34ad" have entirely different histories.

5 changed files with 12 additions and 12 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.244.81", "version": "1.244.80",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.244.81", "version": "1.244.80",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.458.0", "@aws-sdk/client-s3": "^3.458.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.244.81", "version": "1.244.80",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {

View File

@ -202,10 +202,6 @@ const tags = [
name: 'behind the scenes', name: 'behind the scenes',
slug: 'bts', slug: 'bts',
}, },
{
name: 'BTS available',
slug: 'hasbts',
},
{ {
name: 'belgian', name: 'belgian',
slug: 'belgian', slug: 'belgian',

View File

@ -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);
release.tags = data.categories.map((category) => (category.name.toLowerCase() === 'bts' ? 'bts available' : category.name));
release.photoCount = data.photosetPhotoCount || data.episode_photoset_photo_count; release.photoCount = data.photosetPhotoCount || data.episode_photoset_photo_count;
return release; return release;

View File

@ -74,14 +74,19 @@ function withRelations(queryBuilder, withMedia) {
} }
async function matchReleaseTags(releases) { async function matchReleaseTags(releases) {
const tags = releases const rawTags = releases
.map((release) => release.tags).flat() .map((release) => release.tags).flat()
.map((tag) => tag.trim().toLowerCase())
.filter(Boolean); .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') const tagEntries = await knex('tags')
.select('tags.id', 'tags.name', 'tags.alias_for', 'tags.implied_tag_ids') .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 const tagIdsBySlug = tagEntries
.reduce((acc, tag) => ({ .reduce((acc, tag) => ({