From ffb38ef5993109ed1b460391964b5029fa7c74b7 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 1 Dec 2017 12:31:27 -0800 Subject: [PATCH] Update blacklist after changing notifier configs --- plexpy/notifiers.py | 2 ++ plexpy/request.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index a41a750f..c6d25feb 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -499,6 +499,7 @@ def add_notifier_config(agent_id=None, **kwargs): db.upsert(table_name='notifiers', key_dict=keys, value_dict=values) notifier_id = db.last_insert_id() logger.info(u"PlexPy Notifiers :: Added new notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id)) + blacklist_logger() return notifier_id except Exception as e: logger.warn(u"PlexPy Notifiers :: Unable to add notification agent: %s." % e) @@ -548,6 +549,7 @@ def set_notifier_config(notifier_id=None, agent_id=None, **kwargs): try: db.upsert(table_name='notifiers', key_dict=keys, value_dict=values) logger.info(u"PlexPy Notifiers :: Updated notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id)) + blacklist_logger() return True except Exception as e: logger.warn(u"PlexPy Notifiers :: Unable to update notification agent: %s." % e) diff --git a/plexpy/request.py b/plexpy/request.py index cd527083..b1118706 100644 --- a/plexpy/request.py +++ b/plexpy/request.py @@ -318,6 +318,6 @@ def server_message(response, return_msg=False): message = message[:150] + "..." if return_msg: - return message + return unicode(message, 'UTF-8') logger.debug("Server responded with message: %s", message)