Fixed opensubtitles.com exception when invalid JSON is returned from provider. #1572

pull/1581/head
morpheus65535 3 years ago
parent ff8865555a
commit 95a509cf23

@ -299,6 +299,8 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
try: try:
result = res.json() result = res.json()
if 'data' not in result:
raise ValueError
except ValueError: except ValueError:
raise ProviderError('Invalid JSON returned by provider') raise ProviderError('Invalid JSON returned by provider')
else: else:

Loading…
Cancel
Save