Update blacklist after changing notifier configs
This commit is contained in:
@@ -499,6 +499,7 @@ def add_notifier_config(agent_id=None, **kwargs):
|
|||||||
db.upsert(table_name='notifiers', key_dict=keys, value_dict=values)
|
db.upsert(table_name='notifiers', key_dict=keys, value_dict=values)
|
||||||
notifier_id = db.last_insert_id()
|
notifier_id = db.last_insert_id()
|
||||||
logger.info(u"PlexPy Notifiers :: Added new notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id))
|
logger.info(u"PlexPy Notifiers :: Added new notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id))
|
||||||
|
blacklist_logger()
|
||||||
return notifier_id
|
return notifier_id
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn(u"PlexPy Notifiers :: Unable to add notification agent: %s." % 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:
|
try:
|
||||||
db.upsert(table_name='notifiers', key_dict=keys, value_dict=values)
|
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))
|
logger.info(u"PlexPy Notifiers :: Updated notification agent: %s (notifier_id %s)." % (agent['label'], notifier_id))
|
||||||
|
blacklist_logger()
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn(u"PlexPy Notifiers :: Unable to update notification agent: %s." % e)
|
logger.warn(u"PlexPy Notifiers :: Unable to update notification agent: %s." % e)
|
||||||
|
@@ -318,6 +318,6 @@ def server_message(response, return_msg=False):
|
|||||||
message = message[:150] + "..."
|
message = message[:150] + "..."
|
||||||
|
|
||||||
if return_msg:
|
if return_msg:
|
||||||
return message
|
return unicode(message, 'UTF-8')
|
||||||
|
|
||||||
logger.debug("Server responded with message: %s", message)
|
logger.debug("Server responded with message: %s", message)
|
||||||
|
Reference in New Issue
Block a user