From 9f0a8d0a144d9877f2d8e97dbb2720591e6c4afa Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Sat, 10 Feb 2024 19:11:11 -0500 Subject: [PATCH] no log: added another failsafe for provider pool update --- bazarr/subtitles/pool.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bazarr/subtitles/pool.py b/bazarr/subtitles/pool.py index a9908ea05..306898772 100644 --- a/bazarr/subtitles/pool.py +++ b/bazarr/subtitles/pool.py @@ -88,7 +88,14 @@ def update_pools(f): except (ValueError, IndexError): profile_id = None - updated = _update_pool(args[args_spec.index("media_type")], profile_id) + try: + media_type = kwargs["media_type"] + except KeyError: + media_type = args[args_spec.index("media_type")] + except (ValueError, IndexError): + media_type = None + + updated = _update_pool(media_type, profile_id) if updated: logging.debug(