Skip to content

Commit

Permalink
Fix provider configs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vitiko98 committed Jul 3, 2022
1 parent b9ba99e commit a748903
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion libs/subliminal_patch/core.py
Expand Up @@ -70,6 +70,16 @@ def repl(m):
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)
Expand Down Expand Up @@ -108,7 +118,9 @@ def update(self, items):
else:
logger.debug("No provider config updates")

return super().update(items)
_nested_update(self, items)

return None


class _Banlist:
Expand Down

0 comments on commit a748903

Please sign in to comment.