From 833fc80e2872d58689ddebbc86ad10d3608caa16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 11 Nov 2019 20:52:40 -0500 Subject: [PATCH 1/2] Removing GA tracking of search as we are exceeding monthly limit. --- bazarr/get_subtitle.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index bce0a9505..b75a8949e 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -177,8 +177,6 @@ def download_subtitle(path, language, hi, forced, providers, providers_auth, sce pre_download_hook=None, # fixme post_download_hook=None, # fixme language_hook=None) # fixme - for provider in providers: - track_event(category=provider, action='search', label=language_from_alpha3(language[0])) else: downloaded_subtitles = None logging.info("BAZARR All providers are throttled") @@ -335,8 +333,6 @@ def manual_search(path, language, hi, forced, providers, providers_auth, sceneNa provider_configs=providers_auth, throttle_callback=provider_throttle, language_hook=None) # fixme - for provider in providers: - track_event(category=provider, action='search', label=language_from_alpha3(lang)) else: subtitles = [] logging.info("BAZARR All providers are throttled") From 2602a0550dfadaee2081dbac16eb0760e32535e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 11 Nov 2019 20:53:46 -0500 Subject: [PATCH 2/2] Fix for #670. --- bazarr/main.py | 4 +++- views/menu.tpl | 8 ++++---- views/system.tpl | 12 ++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/bazarr/main.py b/bazarr/main.py index 2c3ca2ded..e66681afa 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -1,6 +1,6 @@ # coding=utf-8 -bazarr_version = '0.8.3.2' +bazarr_version = '0.8.3.3' import os os.environ["SZ_USER_AGENT"] = "Bazarr/1" @@ -190,6 +190,7 @@ def shutdown(): else: stop_file.write('') stop_file.close() + sys.exit(0) @route(base_url + 'restart') @@ -208,6 +209,7 @@ def restart(): logging.info('Bazarr is being restarted...') restart_file.write('') restart_file.close() + sys.exit(0) @route(base_url + 'wizard') diff --git a/views/menu.tpl b/views/menu.tpl index e83ca35a2..a44b7b7a4 100644 --- a/views/menu.tpl +++ b/views/menu.tpl @@ -276,11 +276,11 @@ $('#loader_text').text("Bazarr is restarting. Please Wait..."); $.ajax({ url: "{{base_url}}restart", - async: true + async: true, + error: (function(){ + setTimeout(function(){ setInterval(ping, 2000); },8000); + }) }) - .done(function(){ - setTimeout(function(){ setInterval(ping, 2000); },8000); - }); }); % from config import settings diff --git a/views/system.tpl b/views/system.tpl index 01faaa1a7..3b66e5360 100644 --- a/views/system.tpl +++ b/views/system.tpl @@ -419,12 +419,12 @@ $('#restart').on('click', function(){ $('#loader_text').text("Bazarr is restarting, please wait..."); $.ajax({ - url: "{{base_url}}restart", - async: true - }) - .done(function(){ - setTimeout(function(){ setInterval(ping, 2000); },8000); - }) + url: "{{base_url}}restart", + async: true, + error: (function () { + setTimeout(function () { setInterval(ping, 2000); }, 8000); + }) + }); }); % from config import settings