allow '*-filter' options to be a list of expressions

This commit is contained in:
Mike Fährmann
2022-12-21 20:36:46 +01:00
parent 73ab5d84c0
commit 1800bd7d14
3 changed files with 21 additions and 8 deletions

View File

@@ -802,6 +802,8 @@ class FilterPredicate():
"""Predicate; True if evaluating the given expression returns True"""
def __init__(self, expr, target="image"):
if not isinstance(expr, str):
expr = "(" + ") and (".join(expr) + ")"
name = "<{} filter>".format(target)
self.expr = compile_expression(expr, name)