Add TAUTULLI_ENCODING to script environment variables

This commit is contained in:
JonnyWong16 2018-06-29 13:11:44 -07:00
parent 2e290d0b0c
commit fdd8ac7c7b

View file

@ -2996,7 +2996,8 @@ class SCRIPTS(Notifier):
env = {'PLEX_URL': plexpy.CONFIG.PMS_URL, env = {'PLEX_URL': plexpy.CONFIG.PMS_URL,
'PLEX_TOKEN': plexpy.CONFIG.PMS_TOKEN, 'PLEX_TOKEN': plexpy.CONFIG.PMS_TOKEN,
'TAUTULLI_URL': helpers.get_plexpy_url(hostname='localhost'), 'TAUTULLI_URL': helpers.get_plexpy_url(hostname='localhost'),
'TAUTULLI_APIKEY': plexpy.CONFIG.API_KEY 'TAUTULLI_APIKEY': plexpy.CONFIG.API_KEY,
'TAUTULLI_ENCODING': plexpy.SYS_ENCODING,
} }
env.update(os.environ) env.update(os.environ)
@ -3028,12 +3029,12 @@ class SCRIPTS(Notifier):
if error: if error:
err = '\n '.join([l for l in error.splitlines()]) err = '\n '.join([l for l in error.splitlines()])
logger.error(u"Tautulli Notifiers :: Script error: \n %s" % err) logger.error("Tautulli Notifiers :: Script error: \n %s" % err)
return False return False
if output: if output:
out = '\n '.join([l for l in output.splitlines()]) out = '\n '.join([l for l in output.splitlines()])
logger.debug(u"Tautulli Notifiers :: Script returned: \n %s" % out) logger.debug("Tautulli Notifiers :: Script returned: \n %s" % out)
if not self.script_killed: if not self.script_killed:
logger.info(u"Tautulli Notifiers :: Script notification sent.") logger.info(u"Tautulli Notifiers :: Script notification sent.")