Filtering dateless scenes when showcasing is enabled.
This commit is contained in:
parent
78cb842cf7
commit
4aef570096
|
@ -74,7 +74,7 @@ function curateScene(rawScene, assets) {
|
|||
slug: tag.slug,
|
||||
name: tag.name,
|
||||
})),
|
||||
qualities: rawScene.qualities.sort((qualityA, qualityB) => qualityB - qualityA),
|
||||
qualities: rawScene.qualities?.sort((qualityA, qualityB) => qualityB - qualityA) || [],
|
||||
movies: assets.movies.map((movie) => ({
|
||||
id: movie.id,
|
||||
slug: movie.slug,
|
||||
|
@ -360,6 +360,10 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
|||
builder.where('scenes.is_showcased', filters.isShowcased);
|
||||
}
|
||||
|
||||
if (filters.isShowcased) {
|
||||
builder.where('scenes.date', '>', 0);
|
||||
}
|
||||
|
||||
if (!filters.scope || filters.scope === 'latest') {
|
||||
builder
|
||||
.where('effective_date', '<=', Math.round(Date.now() / 1000))
|
||||
|
|
Loading…
Reference in New Issue