Subdl Provider: avoid raising exception on no results

ProviderError is raised when the movie or the TVShow is not found,
causing Bazarr to throttle the provider instead of returning an empty
list.
This commit is contained in:
Vitiko 2024-07-26 19:09:09 -04:00
parent e4429e1a41
commit 8fe8eaf7da

View file

@ -181,7 +181,8 @@ class SubdlProvider(ProviderRetryMixin, Provider):
result = res.json()
if ('success' in result and not result['success']) or ('status' in result and not result['status']):
raise ProviderError(result['error'])
logger.debug(result["error"])
return []
logger.debug(f"Query returned {len(result['subtitles'])} subtitles")