Fixed pagination. Added entity page channel tile expand.

This commit is contained in:
2024-01-25 03:07:26 +01:00
parent 0b3f98826b
commit d739975d36
29 changed files with 1056 additions and 128 deletions

View File

@@ -183,6 +183,10 @@ function buildQuery(filters = {}) {
sort = [{ created_at: 'desc' }, { effective_date: 'asc' }];
}
if (filters.scope === 'likes') {
sort = [{ stashed: 'desc' }, { effective_date: 'desc' }];
}
if (filters.tagIds) {
filters.tagIds.forEach((tagId) => {
query.bool.must.push({ equals: { 'any(tag_ids)': tagId } });
@@ -272,6 +276,7 @@ export async function fetchScenes(filters, rawOptions) {
offset: (options.page - 1) * options.limit,
sort,
aggs: buildAggregates(options),
max_matches: 5000,
});
const actorCounts = options.aggregateActors && countAggregations(result.aggregations?.actorIds?.buckets);