From a619bbbe99c5a4530ed06d0613fd3deac97fb77a 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 21:27:41 -0400 Subject: [PATCH] Continuing development. --- bazarr/init.py | 10 ++++++++++ views/settings.tpl | 22 +++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/bazarr/init.py b/bazarr/init.py index eb3af0ce3..09d4ad639 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -17,6 +17,16 @@ from get_args import args # set subliminal_patch user agent os.environ["SZ_USER_AGENT"] = "Bazarr/1" +# 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"] = None + # Check if args.config_dir exist if not os.path.exists(args.config_dir): # Create config_dir directory tree diff --git a/views/settings.tpl b/views/settings.tpl index d3af01107..37c51c674 100644 --- a/views/settings.tpl +++ b/views/settings.tpl @@ -1256,7 +1256,17 @@
- + +
+
+ Anti-Captcha.com +
+
+ +
+
+
+
@@ -1268,6 +1278,16 @@
+
+
+
+ +
+ +
+