diff --git a/tagstudio/src/core/library/alchemy/enums.py b/tagstudio/src/core/library/alchemy/enums.py index aaf9d32af..aca5d5ae8 100644 --- a/tagstudio/src/core/library/alchemy/enums.py +++ b/tagstudio/src/core/library/alchemy/enums.py @@ -77,7 +77,10 @@ class FilterState: path: Path | str | None = None # file name name: str | None = None - + # file type + filetype: str | None = None + mediatype: str | None = None + # a generic query to be parsed query: str | None = None @@ -87,6 +90,7 @@ def __post_init__(self): # parse the value if ":" in query: kind, _, value = query.partition(":") + value = value.replace('"', "") else: # default to tag search kind, value = "tag", query @@ -101,6 +105,10 @@ def __post_init__(self): self.name = value elif kind == "id": self.id = int(self.id) if str(self.id).isnumeric() else self.id + elif kind == "filetype": + self.filetype = value + elif kind == "mediatype": + self.mediatype = value else: self.tag = self.tag and self.tag.strip()