mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Add "does not begin with" and "does not end with" condition operators
This commit is contained in:
parent
3c40f83738
commit
ac520d656b
1 changed files with 6 additions and 0 deletions
|
@ -339,9 +339,15 @@ def notify_custom_conditions(notifier_id=None, parameters=None):
|
||||||
elif operator == 'begins with':
|
elif operator == 'begins with':
|
||||||
evaluated = parameter_value.startswith(tuple(values))
|
evaluated = parameter_value.startswith(tuple(values))
|
||||||
|
|
||||||
|
elif operator == 'does not begin with':
|
||||||
|
evaluated = not parameter_value.startswith(tuple(values))
|
||||||
|
|
||||||
elif operator == 'ends with':
|
elif operator == 'ends with':
|
||||||
evaluated = parameter_value.endswith(tuple(values))
|
evaluated = parameter_value.endswith(tuple(values))
|
||||||
|
|
||||||
|
elif operator == 'does not end with':
|
||||||
|
evaluated = not parameter_value.endswith(tuple(values))
|
||||||
|
|
||||||
elif operator == 'is greater than':
|
elif operator == 'is greater than':
|
||||||
evaluated = any(parameter_value > c for c in values)
|
evaluated = any(parameter_value > c for c in values)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue