Skip to content

Commit

Permalink
no log: fix for GA
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed May 6, 2021
1 parent 5e30365 commit ea24176
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bazarr/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions bazarr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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


Expand Down

0 comments on commit ea24176

Please sign in to comment.