From c496af6fc4ac046a50c3da6ee7f79ef02212a768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 13 Aug 2020 09:32:50 -0400 Subject: [PATCH] Fix for #1034. --- bazarr/get_providers.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bazarr/get_providers.py b/bazarr/get_providers.py index 3bac72326..a29abac35 100644 --- a/bazarr/get_providers.py +++ b/bazarr/get_providers.py @@ -30,7 +30,8 @@ hours_until_end_of_day = time_until_end_of_day().seconds // 3600 + 1 VALID_THROTTLE_EXCEPTIONS = (TooManyRequests, DownloadLimitExceeded, ServiceUnavailable, APIThrottled, ParseResponseError, IPAddressBlocked) -VALID_COUNT_EXCEPTIONS = ('TooManyRequests', 'ServiceUnavailable', 'APIThrottled', requests.Timeout, socket.timeout) +VALID_COUNT_EXCEPTIONS = ('TooManyRequests', 'ServiceUnavailable', 'APIThrottled', requests.Timeout, + requests.ReadTimeout, socket.timeout) PROVIDER_THROTTLE_MAP = { "default": { @@ -39,8 +40,9 @@ PROVIDER_THROTTLE_MAP = { ServiceUnavailable: (datetime.timedelta(minutes=20), "20 minutes"), APIThrottled: (datetime.timedelta(minutes=10), "10 minutes"), ParseResponseError: (datetime.timedelta(hours=6), "6 hours"), - requests.Timeout: (datetime.timedelta(minutes=20), "20 minutes"), - socket.timeout: (datetime.timedelta(minutes=20), "20 minutes"), + requests.Timeout: (datetime.timedelta(hours=1), "1 hour"), + socket.timeout: (datetime.timedelta(hours=1), "1 hour"), + requests.ReadTimeout: (datetime.timedelta(hours=1), "1 hour"), }, "opensubtitles": { TooManyRequests: (datetime.timedelta(hours=3), "3 hours"),