mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 06:04:15 +00:00
Lowercase input of istartswith/iendswith (#1359)
To be symmetric with other case insensitive methods that lowercase both operands in comparison
This commit is contained in:
parent
7c99d4af05
commit
4b67b4db5c
1 changed files with 2 additions and 2 deletions
|
@ -22,9 +22,9 @@ OPERATORS = {
|
|||
'lt': lambda v, q: v < q,
|
||||
'lte': lambda v, q: v <= q,
|
||||
'startswith': lambda v, q: v.startswith(q),
|
||||
'istartswith': lambda v, q: v.lower().startswith(q),
|
||||
'istartswith': lambda v, q: v.lower().startswith(q.lower()),
|
||||
'endswith': lambda v, q: v.endswith(q),
|
||||
'iendswith': lambda v, q: v.lower().endswith(q),
|
||||
'iendswith': lambda v, q: v.lower().endswith(q.lower()),
|
||||
'exists': lambda v, q: v is not None if q else v is None,
|
||||
'regex': lambda v, q: bool(re.search(q, v)),
|
||||
'iregex': lambda v, q: bool(re.search(q, v, flags=re.IGNORECASE)),
|
||||
|
|
Loading…
Reference in a new issue