From d7bfa7a43849c1a087a954c08bd690c55b96213d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 7 Apr 2019 22:29:11 -0400 Subject: [PATCH] Continuing development. --- bazarr/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bazarr/main.py b/bazarr/main.py index 90e5d7931..435627082 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -1314,6 +1314,18 @@ def save_settings(): settings.anticaptcha.anti_captcha_key = text_type(settings_anti_captcha_key) settings.deathbycaptcha.username = text_type(settings_death_by_captcha_username) settings.deathbycaptcha.password = text_type(settings_death_by_captcha_password) + + # set anti-captcha provider and key + if settings.general.anti_captcha_provider == 'anti-captcha': + os.environ["ANTICAPTCHA_CLASS"] = 'AntiCaptchaProxyLess' + os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = settings.anticaptcha.anti_captcha_key + elif settings.general.anti_captcha_provider == 'AntiCaptchaProxyLessPitcher': + os.environ["ANTICAPTCHA_CLASS"] = 'DBCProxyLess' + os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = ':'.join( + {settings.deathbycaptcha.username, settings.deathbycaptcha.password}) + else: + os.environ["ANTICAPTCHA_CLASS"] = '' + settings.general.minimum_score_movie = text_type(settings_general_minimum_score_movies) settings.general.use_embedded_subs = text_type(settings_general_embedded) settings.general.adaptive_searching = text_type(settings_general_adaptive_searching)