Replacing Sub-Zero user agent with Bazarr.

pull/292/head
morpheus65535 6 years ago
parent 7c59b2d82c
commit bcc0fd3765

@ -147,7 +147,7 @@ class ArgenteamProvider(Provider, ProviderSubtitleArchiveMixin):
def initialize(self): def initialize(self):
self.session = Session() self.session = Session()
self.session.headers = {'User-Agent': os.environ.get("SZ_USER_AGENT", "Sub-Zero/2")} self.session.headers = {'User-Agent': "Bazarr/1"}
def terminate(self): def terminate(self):
self.session.close() self.session.close()

@ -103,7 +103,7 @@ class AssrtProvider(Provider):
def initialize(self): def initialize(self):
self.session = Session() self.session = Session()
self.session.headers = {'User-Agent': os.environ.get("SZ_USER_AGENT", "Sub-Zero/2")} self.session.headers = {'User-Agent': "Bazarr/1"}
def terminate(self): def terminate(self):
self.session.close() self.session.close()

@ -133,7 +133,7 @@ class HosszupuskaProvider(Provider, ProviderSubtitleArchiveMixin):
def initialize(self): def initialize(self):
self.session = Session() self.session = Session()
self.session.headers = {'User-Agent': os.environ.get("SZ_USER_AGENT", "Sub-Zero/2")} self.session.headers = {'User-Agent': "Bazarr/1"}
def terminate(self): def terminate(self):
self.session.close() self.session.close()

@ -121,7 +121,7 @@ class OpenSubtitlesProvider(ProviderRetryMixin, _OpenSubtitlesProvider):
def get_server_proxy(self, url, timeout=None): def get_server_proxy(self, url, timeout=None):
return ServerProxy(url, SubZeroRequestsTransport(use_https=self.use_ssl, timeout=timeout or self.timeout, return ServerProxy(url, SubZeroRequestsTransport(use_https=self.use_ssl, timeout=timeout or self.timeout,
user_agent=os.environ.get("SZ_USER_AGENT", "Sub-Zero/2"))) user_agent="Bazarr/1"))
def log_in(self, server_url=None): def log_in(self, server_url=None):
if server_url: if server_url:
@ -132,7 +132,7 @@ class OpenSubtitlesProvider(ProviderRetryMixin, _OpenSubtitlesProvider):
response = self.retry( response = self.retry(
lambda: checked( lambda: checked(
lambda: self.server.LogIn(self.username, self.password, 'eng', lambda: self.server.LogIn(self.username, self.password, 'eng',
os.environ.get("SZ_USER_AGENT", "Sub-Zero/2")) "Bazarr/1")
) )
) )

@ -150,7 +150,7 @@ class SuperSubtitlesProvider(Provider, ProviderSubtitleArchiveMixin):
def initialize(self): def initialize(self):
self.session = Session() self.session = Session()
self.session.headers = {'User-Agent': os.environ.get("SZ_USER_AGENT", "Sub-Zero/2")} self.session.headers = {'User-Agent': "Bazarr/1"}
def terminate(self): def terminate(self):
self.session.close() self.session.close()

Loading…
Cancel
Save