From 1326ad87080cc2b6b7ba014fa11710da226e0c70 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 4 Apr 2020 08:12:42 -0700 Subject: [PATCH] Add TAUTULLI_PYTHON_VERSION to script environment variables * Period separated string (e.g. 2.7.17 or 3.8.2) --- plexpy/__init__.py | 2 ++ plexpy/notifiers.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 6d407796..60bffef3 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -34,6 +34,8 @@ from apscheduler.triggers.interval import IntervalTrigger from UniversalAnalytics import Tracker import pytz +PYTHON_VERSION = sys.version_info[:3] + import activity_handler import activity_pinger import common diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index b5b5bb61..049554d0 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -3060,7 +3060,8 @@ class SCRIPTS(Notifier): 'TAUTULLI_URL': helpers.get_plexpy_url(hostname='localhost'), 'TAUTULLI_PUBLIC_URL': plexpy.CONFIG.HTTP_BASE_URL + plexpy.HTTP_ROOT, 'TAUTULLI_APIKEY': plexpy.CONFIG.API_KEY, - 'TAUTULLI_ENCODING': plexpy.SYS_ENCODING + 'TAUTULLI_ENCODING': plexpy.SYS_ENCODING, + 'TAUTULLI_PYTHON_VERSION': '.'.join(map(str, plexpy.PYTHON_VERSION)) }) if user_id: