From 47df4ee884807e38b3705c8ce62df3cbdff32fc0 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 29 Jun 2018 09:48:24 -0700 Subject: [PATCH] Encode script args for all systems --- plexpy/notifiers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 49d69e21..fd6efae6 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -3085,12 +3085,12 @@ class SCRIPTS(Notifier): # For manual notifications if script_args and isinstance(script_args, basestring): # attemps for format it for the user - script_args = [arg.decode('utf-8') for arg in shlex.split(script_args.encode('utf-8'))] + script_args = [arg for arg in shlex.split(script_args.encode(plexpy.SYS_ENCODING, 'ignore'))] # Windows handles unicode very badly. # https://bugs.python.org/issue19264 - if script_args and os.name == 'nt': - script_args = [arg.encode(plexpy.SYS_ENCODING, 'ignore') for arg in script_args] + # if script_args and os.name == 'nt': + # script_args = [arg.encode(plexpy.SYS_ENCODING, 'ignore') for arg in script_args] # Allow overrides for shitty systems if prefix and script_args: