From 8fe8eaf7dad6b1eccde9d0622e946e15acc43688 Mon Sep 17 00:00:00 2001 From: Vitiko Date: Fri, 26 Jul 2024 19:09:09 -0400 Subject: [PATCH] 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. --- custom_libs/subliminal_patch/providers/subdl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_libs/subliminal_patch/providers/subdl.py b/custom_libs/subliminal_patch/providers/subdl.py index 3c59f43a5..102125eae 100644 --- a/custom_libs/subliminal_patch/providers/subdl.py +++ b/custom_libs/subliminal_patch/providers/subdl.py @@ -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")