mirror of https://github.com/morpheus65535/bazarr
Subf2m Provider: add optional config for SSL verification
Temporary
This commit is contained in:
parent
11fff727b2
commit
47aff78ab0
|
@ -163,6 +163,9 @@ defaults = {
|
|||
'podnapisi': {
|
||||
'verify_ssl': 'True'
|
||||
},
|
||||
'subf2m': {
|
||||
'verify_ssl': 'True'
|
||||
},
|
||||
'legendasdivx': {
|
||||
'username': '',
|
||||
'password': '',
|
||||
|
|
|
@ -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')
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue