Added actors and movies to global search results.
This commit is contained in:
@@ -2,15 +2,24 @@ import { fetchScenes } from '#/src/scenes.js';
|
||||
import { curateScenesQuery } from '#/src/web/scenes.js';
|
||||
|
||||
export async function onBeforeRender(pageContext) {
|
||||
const { scenes, limit, total } = await fetchScenes(await curateScenesQuery({
|
||||
const withQuery = Object.hasOwn(pageContext.urlParsed.search, 'q');
|
||||
|
||||
const {
|
||||
scenes,
|
||||
aggTags,
|
||||
aggChannels,
|
||||
aggActors,
|
||||
limit,
|
||||
total,
|
||||
} = await fetchScenes(await curateScenesQuery({
|
||||
...pageContext.urlQuery,
|
||||
scope: pageContext.routeParams.scope || 'latest',
|
||||
isShowcased: true,
|
||||
isShowcased: withQuery ? null : true,
|
||||
tagFilter: pageContext.tagFilter,
|
||||
}), {
|
||||
page: Number(pageContext.routeParams.page) || 1,
|
||||
limit: Number(pageContext.urlParsed.search.limit) || 30,
|
||||
aggregate: false,
|
||||
aggregate: withQuery,
|
||||
}, pageContext.user);
|
||||
|
||||
return {
|
||||
@@ -18,6 +27,9 @@ export async function onBeforeRender(pageContext) {
|
||||
title: pageContext.routeParams.scope,
|
||||
pageProps: {
|
||||
scenes,
|
||||
aggTags,
|
||||
aggChannels,
|
||||
aggActors,
|
||||
limit,
|
||||
total,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user