From b3cfcf660ea62aeaab77e71b9fa688dd419e8425 Mon Sep 17 00:00:00 2001 From: aboron Date: Fri, 8 Jul 2016 11:37:49 -0400 Subject: [PATCH] Changed Hipchat emoticon checkbox to user definable string, since (plex) was a custom user emoticon. --- plexpy/config.py | 2 +- plexpy/notifiers.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/plexpy/config.py b/plexpy/config.py index 027965ff..1b075a99 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -215,7 +215,7 @@ _CONFIG_DEFINITIONS = { 'HIPCHAT_URL': (str, 'Hipchat', ''), 'HIPCHAT_COLOR': (str, 'Hipchat', 'green'), 'HIPCHAT_INCL_SUBJECT': (int, 'Hipchat', 1), - 'HIPCHAT_INCL_EMOTICON': (int, 'Hipchat', 0), + 'HIPCHAT_INCL_EMOTICON': (str, 'Hipchat', ''), 'HIPCHAT_ENABLED': (int, 'Hipchat', 0), 'HIPCHAT_ON_PLAY': (int, 'Hipchat', 0), 'HIPCHAT_ON_STOP': (int, 'Hipchat', 0), diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index d8064f42..0c5f4346 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -2767,7 +2767,7 @@ class HIPCHAT(object): text = message.encode('utf-8') if self.incl_emoticon: - text = '(plex) ' + text + text = self.incl_emoticon + ' ' + text data = {'color': self.color, 'message': text, @@ -2820,18 +2820,19 @@ class HIPCHAT(object): ' may use any valid Hipchat message color value.', 'input_type': 'text' }, + {'label': 'Prefix emoticon', + 'value': self.incl_emoticon, + 'name': 'hipchat_incl_emoticon', + 'description': 'Include an emoticon tag at the beginning of all notifications.' + ' Use a stock emoticon or create a custom emoticon' + ' here.', + 'input_type': 'text' + }, {'label': 'Include Subject Line', 'value': self.incl_subject, 'name': 'hipchat_incl_subject', 'description': 'Include the subject line with the notifications.', 'input_type': 'checkbox' - }, - {'label': 'Include (plex) emoticon', - 'value': self.incl_emoticon, - 'name': 'hipchat_incl_emoticon', - 'description': 'Include (plex) emoticon tag at the beginning of all notifications.' - ' Create a custom emoticon here.', - 'input_type': 'checkbox' } ]