Merge branch 'development' into morpheus

# Conflicts:
#	bazarr/get_subtitle.py
pull/543/head
Louis Vézina 5 years ago
commit 30b94a62ff

@ -19,7 +19,6 @@ radarr_version = get_radarr_version()
def track_event(category=None, action=None, label=None):
if not settings.analytics.getboolean('enabled'):
print "no analytics"
return
anonymousConfig = Config()
@ -41,12 +40,18 @@ def track_event(category=None, action=None, label=None):
tracker.add_custom_variable(CustomVariable(index=1, name='BazarrVersion', value=os.environ["BAZARR_VERSION"], scope=1))
tracker.add_custom_variable(CustomVariable(index=2, name='PythonVersion', value=platform.python_version(), scope=1))
tracker.add_custom_variable(CustomVariable(index=3, name='SonarrVersion', value=sonarr_version, scope=1))
tracker.add_custom_variable(CustomVariable(index=4, name='RadarrVersion', value=radarr_version, scope=1))
if settings.general.getboolean('use_sonarr'):
tracker.add_custom_variable(CustomVariable(index=3, name='SonarrVersion', value=sonarr_version, scope=1))
if settings.general.getboolean('use_radarr'):
tracker.add_custom_variable(CustomVariable(index=4, name='RadarrVersion', value=radarr_version, scope=1))
tracker.add_custom_variable(CustomVariable(index=5, name='OSVersion', value=platform.platform(), scope=1))
tracker.track_event(event, session, visitor)
tracker.track_pageview(page, session, visitor)
settings.analytics.visitor = base64.b64encode(pickle.dumps(visitor))
with open(os.path.join(args.config_dir, 'config', 'config.ini'), 'w+') as handle:
settings.write(handle)
try:
tracker.track_event(event, session, visitor)
tracker.track_pageview(page, session, visitor)
except:
pass
else:
settings.analytics.visitor = base64.b64encode(pickle.dumps(visitor))
with open(os.path.join(args.config_dir, 'config', 'config.ini'), 'w+') as handle:
settings.write(handle)

@ -485,8 +485,8 @@ def manual_download_subtitle(path, language, hi, forced, subtitle, provider, pro
else:
reversed_path = path_replace_reverse_movie(path)
track_event(category=downloaded_provider, action="downloaded", label=downloaded_language)
track_event(category=downloaded_provider, action="manually_downloaded", label=downloaded_language)
return message, reversed_path, downloaded_language_code2, downloaded_provider, subtitle.score, subtitle.language.forced
else:
logging.error(

@ -679,12 +679,16 @@
<label></label>
</div>
</div>
<div class="collapsed column">
<div class="collapsed center aligned column">
<div class="ui basic icon" data-tooltip="Send anonymous usage information, nothing that can identify you. This includes information on which providers you use, what languages you search for, Bazarr, Python, Sonarr, Radarr and OS version you are using. We will use this information to prioritize features and bug fixes. Please, keep this enabled as this is the only way we have to better understand how you use Bazarr." data-inverted="">
<i class="help circle large icon"></i>
</div>
</div>
</div>
<div class="middle align row">
<div class="right aligned four wide column">
</div>
<div class="one wide column">
<i class="help circle large icon"></i>
</div>
<div class="ten wide column">
Send anonymous usage information, nothing that can identify you. This includes information on which providers you use, what languages you search for, Bazarr, Python, Sonarr, Radarr and OS version you are using. We will use this information to prioritize features and bug fixes. Please, keep this enabled as this is the only way we have to better understand how you use Bazarr.
</div>
</div>
</div>

Loading…
Cancel
Save