mirror of https://github.com/morpheus65535/bazarr
Increased podnapisi connection timeout to prevent provider throttling when their servers are slower than usual.
This commit is contained in:
parent
eaa77bd511
commit
6b304e0ce7
|
@ -12,7 +12,6 @@ from zipfile import ZipFile
|
||||||
|
|
||||||
from guessit import guessit
|
from guessit import guessit
|
||||||
|
|
||||||
from requests import Session
|
|
||||||
from requests.adapters import HTTPAdapter
|
from requests.adapters import HTTPAdapter
|
||||||
|
|
||||||
from subliminal.utils import sanitize
|
from subliminal.utils import sanitize
|
||||||
|
@ -203,7 +202,7 @@ class PodnapisiProvider(_PodnapisiProvider, ProviderSubtitleArchiveMixin):
|
||||||
# query the server
|
# query the server
|
||||||
content = None
|
content = None
|
||||||
try:
|
try:
|
||||||
content = self.session.get(self.server_url + 'search/old', params=params, timeout=10).content
|
content = self.session.get(self.server_url + 'search/old', params=params, timeout=30).content
|
||||||
xml = etree.fromstring(content)
|
xml = etree.fromstring(content)
|
||||||
except etree.ParseError:
|
except etree.ParseError:
|
||||||
logger.error("Wrong data returned: %r", content)
|
logger.error("Wrong data returned: %r", content)
|
||||||
|
@ -279,7 +278,7 @@ class PodnapisiProvider(_PodnapisiProvider, ProviderSubtitleArchiveMixin):
|
||||||
def download_subtitle(self, subtitle):
|
def download_subtitle(self, subtitle):
|
||||||
# download as a zip
|
# download as a zip
|
||||||
logger.info('Downloading subtitle %r', subtitle)
|
logger.info('Downloading subtitle %r', subtitle)
|
||||||
r = self.session.get(self.server_url + subtitle.pid + '/download', params={'container': 'zip'}, timeout=10)
|
r = self.session.get(self.server_url + subtitle.pid + '/download', params={'container': 'zip'}, timeout=30)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
|
|
||||||
# open the zip
|
# open the zip
|
||||||
|
|
Loading…
Reference in New Issue