no log: fix for opensubtitles.com login issue.

pull/1523/head
morpheus65535 3 years ago
parent 4a890b2561
commit eb8f482eed

@ -167,7 +167,7 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
raise ProviderError('Invalid JSON returned by provider') raise ProviderError('Invalid JSON returned by provider')
else: else:
region.set("oscom_token", self.token) region.set("oscom_token", self.token)
return True return
elif r.status_code == 401: elif r.status_code == 401:
raise AuthenticationError('Login failed: {}'.format(r.reason)) raise AuthenticationError('Login failed: {}'.format(r.reason))
elif r.status_code == 429: elif r.status_code == 429:
@ -176,8 +176,6 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
raise ProviderError(r.reason) raise ProviderError(r.reason)
else: else:
raise ProviderError('Bad status code: {}'.format(r.status_code)) raise ProviderError('Bad status code: {}'.format(r.status_code))
finally:
return False
@region.cache_on_arguments(expiration_time=SHOW_EXPIRATION_TIME) @region.cache_on_arguments(expiration_time=SHOW_EXPIRATION_TIME)
def search_titles(self, title): def search_titles(self, title):

Loading…
Cancel
Save