summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2023-12-28 14:41:10 -0500
committermorpheus65535 <[email protected]>2023-12-28 14:41:10 -0500
commit6b304e0ce778a4abfd1ede216cf35875fc76d3d6 (patch)
tree1812d470b96d83ce9fe4b6fc166a1a7cb0817abf
parenteaa77bd5117aca682106dbbf0e6d92cdb791f031 (diff)
downloadbazarr-6b304e0ce778a4abfd1ede216cf35875fc76d3d6.tar.gz
bazarr-6b304e0ce778a4abfd1ede216cf35875fc76d3d6.zip
Increased podnapisi connection timeout to prevent provider throttling when their servers are slower than usual.
-rw-r--r--libs/subliminal_patch/providers/podnapisi.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/subliminal_patch/providers/podnapisi.py b/libs/subliminal_patch/providers/podnapisi.py
index f567f25ac..2cf80a4cc 100644
--- a/libs/subliminal_patch/providers/podnapisi.py
+++ b/libs/subliminal_patch/providers/podnapisi.py
@@ -12,7 +12,6 @@ from zipfile import ZipFile
from guessit import guessit
-from requests import Session
from requests.adapters import HTTPAdapter
from subliminal.utils import sanitize
@@ -203,7 +202,7 @@ class PodnapisiProvider(_PodnapisiProvider, ProviderSubtitleArchiveMixin):
# query the server
content = None
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)
except etree.ParseError:
logger.error("Wrong data returned: %r", content)
@@ -279,7 +278,7 @@ class PodnapisiProvider(_PodnapisiProvider, ProviderSubtitleArchiveMixin):
def download_subtitle(self, subtitle):
# download as a zip
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()
# open the zip