summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvitiko98 <[email protected]>2022-07-02 22:52:14 -0400
committervitiko98 <[email protected]>2022-07-02 22:52:14 -0400
commita748903dc4d8c73e30e4b642aae5534a09571477 (patch)
treee4eb9a48db8617d44612233cc63e5006b5c23fea
parentb9ba99e189d9273b7f7451e7046f021d240265ac (diff)
downloadbazarr-a748903dc4d8c73e30e4b642aae5534a09571477.tar.gz
bazarr-a748903dc4d8c73e30e4b642aae5534a09571477.zip
Fix provider configs updatesv1.1.1-beta.0
-rw-r--r--libs/subliminal_patch/core.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/subliminal_patch/core.py b/libs/subliminal_patch/core.py
index 806ec0bba..d8c327f46 100644
--- a/libs/subliminal_patch/core.py
+++ b/libs/subliminal_patch/core.py
@@ -70,6 +70,16 @@ def remove_crap_from_fn(fn):
return REMOVE_CRAP_FROM_FILENAME.sub(repl, fn)
+def _nested_update(item, to_update):
+ for k, v in to_update.items():
+ if isinstance(v, dict):
+ item[k] = _nested_update(item.get(k, {}), v)
+ else:
+ item[k] = v
+
+ return item
+
+
class _ProviderConfigs(dict):
def __init__(self, pool, *args, **kwargs):
super().__init__(*args, **kwargs)
@@ -108,7 +118,9 @@ class _ProviderConfigs(dict):
else:
logger.debug("No provider config updates")
- return super().update(items)
+ _nested_update(self, items)
+
+ return None
class _Banlist: