From 6b36920b1c54c9249a4f4ee71b080aac04b17dec Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Sat, 29 Jan 2022 09:01:13 -0500 Subject: [PATCH] no log: improvement to opensubtitles.com again --- libs/subliminal_patch/providers/opensubtitlescom.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py index 36094d558..58ef14300 100644 --- a/libs/subliminal_patch/providers/opensubtitlescom.py +++ b/libs/subliminal_patch/providers/opensubtitlescom.py @@ -444,11 +444,16 @@ def checked(fn, raise_api_limit=False, validate_token=False, validate_json=False return 401 else: raise AuthenticationError(f'Login failed: {response.reason}') + elif status_code == 403: + raise ProviderError("Bazarr API key seems to be in problem") elif status_code == 406: raise DownloadLimitExceeded("Daily download limit reached") + elif status_code == 410: + raise ProviderError("Download as expired") elif status_code == 429: raise TooManyRequests() elif status_code == 502: + # this one should deal with Bad Gateway issue on their side. raise APIThrottled() elif 500 <= status_code <= 599: raise ProviderError(response.reason)