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 @@
+
+
+
+ +
+ +
+