From 177902a286f034be554ceaa8ababd4775f735748 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 21 Feb 2016 16:42:08 -0800 Subject: [PATCH] Remove media tags from script_args for server notifications --- plexpy/notification_handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index ddf094d8..b9a00028 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -873,6 +873,8 @@ def build_server_notify_text(notify_action=None): logger.error(u"PlexPy NotificationHandler :: Unable to retrieve server uptime.") server_uptime = 'N/A' + pattern = re.compile('\n*[^>]+.\n*|\n*[^>]+.\n*|\n*?[^>]+.\n*', re.IGNORECASE | re.DOTALL) + on_extdown_subject = plexpy.CONFIG.NOTIFY_ON_EXTDOWN_SUBJECT_TEXT on_extdown_body = plexpy.CONFIG.NOTIFY_ON_EXTDOWN_BODY_TEXT on_intdown_subject = plexpy.CONFIG.NOTIFY_ON_INTDOWN_SUBJECT_TEXT @@ -881,7 +883,7 @@ def build_server_notify_text(notify_action=None): on_extup_body = plexpy.CONFIG.NOTIFY_ON_EXTUP_BODY_TEXT on_intup_subject = plexpy.CONFIG.NOTIFY_ON_INTUP_SUBJECT_TEXT on_intup_body = plexpy.CONFIG.NOTIFY_ON_INTUP_BODY_TEXT - script_args_text = plexpy.CONFIG.NOTIFY_SCRIPTS_ARGS_TEXT + script_args_text = strip_tag(re.sub(pattern, '', plexpy.CONFIG.NOTIFY_SCRIPTS_ARGS_TEXT)) available_params = {# Global paramaters 'server_name': server_name,