Implemented negative filters in back-end, added basic fixed filters settings dialog.
This commit is contained in:
@@ -439,10 +439,18 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
||||
builder.where('any(tag_ids)', tagId);
|
||||
});
|
||||
|
||||
if (filters.notTagIds) {
|
||||
builder.whereNotIn('tag_ids', filters.notTagIds);
|
||||
}
|
||||
|
||||
filters.actorIds?.forEach((actorId) => {
|
||||
builder.where('any(actor_ids)', actorId);
|
||||
});
|
||||
|
||||
if (filters.notActorIds) {
|
||||
builder.whereNotIn('actor_ids', filters.notActorIds);
|
||||
}
|
||||
|
||||
if (filters.entityId) {
|
||||
builder.whereRaw('any(entity_ids) = ?', filters.entityId);
|
||||
|
||||
@@ -455,6 +463,10 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
||||
*/
|
||||
}
|
||||
|
||||
if (filters.notEntityIds) {
|
||||
builder.whereNotIn('entity_ids', filters.notEntityIds);
|
||||
}
|
||||
|
||||
if (filters.movieId) {
|
||||
builder.whereRaw('any(movie_ids) = ?', filters.movieId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user