diff options
author | Vitiko <[email protected]> | 2023-01-31 16:38:32 -0400 |
---|---|---|
committer | Vitiko <[email protected]> | 2023-01-31 16:39:38 -0400 |
commit | 47aff78ab0acb8e1c4ebabed455e1a956392da04 (patch) | |
tree | 1ca1c7f12c920df8f0846f50b469333659396133 | |
parent | 11fff727b2699648d29bbe6b438c67ac399bf301 (diff) | |
download | bazarr-47aff78ab0acb8e1c4ebabed455e1a956392da04.tar.gz bazarr-47aff78ab0acb8e1c4ebabed455e1a956392da04.zip |
Subf2m Provider: add optional config for SSL verificationv1.1.5-beta.10
Temporary
-rw-r--r-- | bazarr/app/config.py | 3 | ||||
-rw-r--r-- | bazarr/app/get_providers.py | 3 | ||||
-rw-r--r-- | frontend/src/pages/Settings/Providers/list.ts | 8 | ||||
-rw-r--r-- | libs/subliminal_patch/providers/subf2m.py | 6 |
4 files changed, 20 insertions, 0 deletions
diff --git a/bazarr/app/config.py b/bazarr/app/config.py index d61ab86f0..94054ac4d 100644 --- a/bazarr/app/config.py +++ b/bazarr/app/config.py @@ -163,6 +163,9 @@ defaults = { 'podnapisi': { 'verify_ssl': 'True' }, + 'subf2m': { + 'verify_ssl': 'True' + }, 'legendasdivx': { 'username': '', 'password': '', diff --git a/bazarr/app/get_providers.py b/bazarr/app/get_providers.py index 72842dc36..c3bccd446 100644 --- a/bazarr/app/get_providers.py +++ b/bazarr/app/get_providers.py @@ -240,6 +240,9 @@ def get_providers_auth(): 'f_username': settings.karagarga.f_username, 'f_password': settings.karagarga.f_password, }, + 'subf2m': { + 'verify_ssl': settings.subf2m.getboolean('verify_ssl') + }, } diff --git a/frontend/src/pages/Settings/Providers/list.ts b/frontend/src/pages/Settings/Providers/list.ts index f69a9cbd2..3ecc6097d 100644 --- a/frontend/src/pages/Settings/Providers/list.ts +++ b/frontend/src/pages/Settings/Providers/list.ts @@ -303,6 +303,14 @@ export const ProviderList: Readonly<ProviderInfo[]> = [ key: "subf2m", name: "subf2m.co", description: "Subscene Alternative Provider", + inputs: [ + { + type: "switch", + key: "verify_ssl", + name: "Verify SSL", + defaultValue: true, + }, + ], }, { key: "subs4free", diff --git a/libs/subliminal_patch/providers/subf2m.py b/libs/subliminal_patch/providers/subf2m.py index 5ab637c6f..2ee78899b 100644 --- a/libs/subliminal_patch/providers/subf2m.py +++ b/libs/subliminal_patch/providers/subf2m.py @@ -135,8 +135,14 @@ class Subf2mProvider(Provider): video_types = (Episode, Movie) subtitle_class = Subf2mSubtitle + def __init__(self, verify_ssl=True): + super().__init__() + self._verify_ssl = verify_ssl + def initialize(self): self._session = Session() + self._session.verify = self._verify_ssl + self._session.headers.update({"user-agent": "Bazarr"}) def terminate(self): |