fix: path now uses GLOB operator for proper GLOBs

This commit is contained in:
Jann Stute
2024-11-28 14:07:16 +01:00
parent eda7f5200f
commit 27fac24da3

View File

@@ -27,7 +27,7 @@ class SQLBoolExpressionBuilder(BaseVisitor):
elif node.type == ConstraintType.TagID:
return Tag.id == int(node.value)
elif node.type == ConstraintType.Path:
return Entry.path.ilike(node.value.replace("*", "%"))
return Entry.path.op("GLOB")(node.value)
elif node.type == ConstraintType.MediaType:
extensions: set[str] = set[str]()
for media_cat in MediaCategories.ALL_CATEGORIES: