diff --git a/bazarr/config.py b/bazarr/config.py index b7bb69bd5..a7a5995d0 100644 --- a/bazarr/config.py +++ b/bazarr/config.py @@ -66,11 +66,15 @@ defaults = { }, 'opensubtitles': { 'username': '', - 'password': '' + 'password': '', + 'vip': 'False', + 'ssl': 'False', + 'timeout': '15' }, 'addic7ed': { 'username': '', - 'password': '' + 'password': '', + 'random_agents': 'False' }, 'legendastv': { 'username': '', diff --git a/bazarr/get_providers.py b/bazarr/get_providers.py index f0b90a9db..361e848aa 100644 --- a/bazarr/get_providers.py +++ b/bazarr/get_providers.py @@ -15,17 +15,19 @@ def get_providers(): def get_providers_auth(): providers_auth = { - 'addic7ed': { - 'username': settings.addic7ed.username, - 'password': settings.addic7ed.password, - }, - 'opensubtitles': { - 'username': settings.opensubtitles.username, - 'password': settings.opensubtitles.password, - }, - 'legendastv': { - 'username': settings.legendastv.username, - 'password': settings.legendastv.password, - }} - + 'addic7ed': {'username': settings.addic7ed.username, + 'password': settings.addic7ed.password, + 'use_random_agents': settings.addic7ed.getboolean('random_agents'), + }, + 'opensubtitles': {'username': settings.opensubtitles.username, + 'password': settings.opensubtitles.password, + 'is_vip': settings.opensubtitles.getboolean('vip'), + 'use_ssl': settings.opensubtitles.getboolean('ssl'), + 'timeout': int(settings.opensubtitles.timeout) or 15, + }, + 'legendastv': {'username': settings.legendastv.username, + 'password': settings.legendastv.password, + } + } + return providers_auth