From ea241768b8108f97448129fda31aa8b388c23fc4 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Thu, 6 May 2021 19:30:40 -0400 Subject: [PATCH] no log: fix for GA --- bazarr/analytics.py | 3 ++- bazarr/utils.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bazarr/analytics.py b/bazarr/analytics.py index 3827aaf2b..59947f1ec 100644 --- a/bazarr/analytics.py +++ b/bazarr/analytics.py @@ -46,7 +46,8 @@ def track_event(category=None, action=None, label=None): session = Session() event = Event(category=category, action=action, label=label, value=1) - tracker.add_custom_variable(CustomVariable(index=1, name='BazarrVersion', value=os.environ["BAZARR_VERSION"], scope=1)) + tracker.add_custom_variable(CustomVariable(index=1, name='BazarrVersion', + value=os.environ["BAZARR_VERSION"].lstrip('v'), scope=1)) tracker.add_custom_variable(CustomVariable(index=2, name='PythonVersion', value=platform.python_version(), scope=1)) if settings.general.getboolean('use_sonarr'): tracker.add_custom_variable(CustomVariable(index=3, name='SonarrVersion', value=sonarr_version, scope=1)) diff --git a/bazarr/utils.py b/bazarr/utils.py index ede3cc2d1..0e15242a1 100644 --- a/bazarr/utils.py +++ b/bazarr/utils.py @@ -209,6 +209,7 @@ def get_sonarr_version(): sonarr_version = requests.get(sv, timeout=60, verify=False).json()['version'] except Exception: logging.debug('BAZARR cannot get Sonarr version') + sonarr_version = 'unknown' return sonarr_version @@ -247,6 +248,7 @@ def get_radarr_version(): radarr_version = requests.get(rv, timeout=60, verify=False).json()['version'] except Exception: logging.debug('BAZARR cannot get Radarr version') + radarr_version = 'unknown' return radarr_version