Compare commits
4
Commits
dd522c1fb1
...
3c47a1b14e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c47a1b14e | ||
|
|
da6ccccab4 | ||
|
|
f79ef53ebd | ||
|
|
185984bf0c |
@@ -135,7 +135,8 @@ const { user } = pageContext;
|
||||
const pageStash = pageContext.pageProps.stash;
|
||||
const currentStash = pageStash || pageContext.assets?.primaryStash;
|
||||
|
||||
const sceneTags = Object.values(Object.fromEntries(props.scene.tags.map((tag) => [tag.id, tag])));
|
||||
const tagsById = Object.fromEntries(props.scene.tags.map((tag) => [tag.id, tag]));
|
||||
const sceneTags = Array.from(new Set(props.scene.tags.map((tag) => tag.id))).map((tagId) => tagsById[tagId]);
|
||||
|
||||
const priorityTags = sceneTags.map((tag) => tag.name).slice(0, 2);
|
||||
const favorited = ref(props.scene.stashes.some((sceneStash) => sceneStash.id === currentStash?.id));
|
||||
|
||||
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "traxxx-web",
|
||||
"version": "0.47.2",
|
||||
"version": "0.47.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.47.2",
|
||||
"version": "0.47.4",
|
||||
"dependencies": {
|
||||
"@brillout/json-serializer": "^0.5.8",
|
||||
"@dicebear/collection": "^7.0.5",
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@
|
||||
"overrides": {
|
||||
"vite": "$vite"
|
||||
},
|
||||
"version": "0.47.2",
|
||||
"version": "0.47.4",
|
||||
"imports": {
|
||||
"#/*": "./*.js"
|
||||
}
|
||||
|
||||
+9
-9
@@ -564,15 +564,15 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
||||
.offset((options.page - 1) * options.limit),
|
||||
// option threads=1 fixes actors, but drastically slows down performance, wait for fix
|
||||
yearsFacet: options.aggregateYears ? knex.raw('facet effective_year as years order by effective_year desc limit ?', [aggSize]) : null,
|
||||
actorsFacet: options.aggregateActors ? knex.raw('facet scenes.actor_ids order by count(*) desc limit ?', [aggSize]) : null,
|
||||
actorsFacet: options.aggregateActors ? knex.raw('facet scenes.actor_ids distinct id order by count(distinct id) desc limit ?', [aggSize]) : null,
|
||||
// don't facet tags associated to other actors, actor ID 0 means global
|
||||
tagsFacet: options.aggregateTags // eslint-disable-line no-nested-ternary
|
||||
? (filters.stashId // we can't join the tags table as well as the stashes table
|
||||
? knex.raw('facet scenes.tag_ids order by count(*) desc limit ?', [aggSize])
|
||||
: knex.raw(`facet IF(IN(scenes_tags.actor_id, ${[0, ...filters?.actorIds || []]}), scenes_tags.tag_id, 0) as tags_facet distinct id order by count(distinct id) desc limit ?`, [aggSize]))
|
||||
: null,
|
||||
channelsFacet: options.aggregateChannels ? knex.raw('facet scenes.channel_id order by count(*) desc limit ?', [aggSize]) : null,
|
||||
studiosFacet: options.aggregateChannels ? knex.raw('facet scenes.studio_id order by count(*) desc limit ?', [aggSize]) : null,
|
||||
channelsFacet: options.aggregateChannels ? knex.raw('facet scenes.channel_id distinct id order by count(distinct id) desc limit ?', [aggSize]) : null,
|
||||
studiosFacet: options.aggregateChannels ? knex.raw('facet scenes.studio_id distinct id order by count(distinct id) desc limit ?', [aggSize]) : null,
|
||||
maxMatches: config.database.manticore.maxMatches,
|
||||
maxQueryTime: config.database.manticore.maxQueryTime,
|
||||
}).toString();
|
||||
@@ -598,8 +598,8 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
||||
|| [];
|
||||
|
||||
const actorIds = results
|
||||
.find((result) => (result.columns[0].actor_ids || result.columns[0]['scenes.actor_ids']) && result.columns[1]['count(*)'])
|
||||
?.data.map((row) => ({ key: row.actor_ids || row['scenes.actor_ids'], doc_count: row['count(*)'] }))
|
||||
.find((result) => (result.columns[0].actor_ids || result.columns[0]['scenes.actor_ids']) && result.columns[1]['count(distinct id)'])
|
||||
?.data.map((row) => ({ key: row.actor_ids || row['scenes.actor_ids'], doc_count: row['count(distinct id)'] }))
|
||||
|| [];
|
||||
|
||||
const tagIds = results
|
||||
@@ -608,14 +608,14 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
||||
|| [];
|
||||
|
||||
const channelIds = results
|
||||
.find((result) => (result.columns[0].channel_id || result.columns[0]['scenes.channel_id']) && result.columns[1]['count(*)'])
|
||||
?.data.map((row) => ({ key: row.channel_id || row['scenes.channel_id'], doc_count: row['count(*)'] }))
|
||||
.find((result) => (result.columns[0].channel_id || result.columns[0]['scenes.channel_id']) && result.columns[1]['count(distinct id)'])
|
||||
?.data.map((row) => ({ key: row.channel_id || row['scenes.channel_id'], doc_count: row['count(distinct id)'] }))
|
||||
|| [];
|
||||
|
||||
const studioIds = results
|
||||
.find((result) => (result.columns[0].studio_id || result.columns[0]['scenes.studio_id']) && result.columns[1]['count(*)'])
|
||||
.find((result) => (result.columns[0].studio_id || result.columns[0]['scenes.studio_id']) && result.columns[1]['count(distinct id)'])
|
||||
?.data
|
||||
.map((row) => ({ key: row.studio_id || row['scenes.studio_id'], doc_count: row['count(*)'] }))
|
||||
.map((row) => ({ key: row.studio_id || row['scenes.studio_id'], doc_count: row['count(distinct id)'] }))
|
||||
.filter((row) => !!row.key)
|
||||
|| [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user