From 6807cebe51311f599a32f5df421c2dccc6e0c498 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 17 Feb 2023 18:55:28 -0800 Subject: [PATCH] Strip whitespace from condition values --- plexpy/notification_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 4b727c5d..197314fc 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -294,7 +294,7 @@ def notify_custom_conditions(notifier_id=None, parameters=None): # Cast the condition values to the correct type try: if parameter_type == 'str': - values = ['' if v == '~' else str(v).lower() for v in values] + values = ['' if v == '~' else str(v).strip().lower() for v in values] elif parameter_type == 'int': values = [helpers.cast_to_int(v) for v in values] @@ -313,7 +313,7 @@ def notify_custom_conditions(notifier_id=None, parameters=None): # Cast the parameter value to the correct type try: if parameter_type == 'str': - parameter_value = str(parameter_value).lower() + parameter_value = str(parameter_value).strip().lower() elif parameter_type == 'int': parameter_value = helpers.cast_to_int(parameter_value)