Explicitly movie scenes by oldest.

This commit is contained in:
DebaucheryLibrarian 2024-05-31 05:05:33 +02:00
parent 2e3ce4e410
commit eb2807d0e0
2 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ export async function onBeforeRender(pageContext) {
fetchMoviesById([Number(pageContext.routeParams.movieId)], pageContext.user),
fetchScenes(await curateScenesQuery({
...pageContext.urlQuery,
scope: 'oldest',
movieId: Number(pageContext.routeParams.movieId),
}), {
page: Number(pageContext.routeParams.page) || 1,

View File

@ -522,6 +522,8 @@ async function queryManticoreSql(filters, options, _reqUser) {
{ column: 'stashed_at', order: 'desc' },
{ column: 'scenes.effective_date', order: 'desc' },
]);
} else if (filters.scope === 'oldest') {
builder.orderBy('scenes.effective_date', 'asc');
} else {
builder.orderBy('scenes.effective_date', 'desc');
}