mirror of
https://github.com/zoriya/guessit.git
synced 2026-06-08 04:31:35 +00:00
fix(streaming_service): keep pattern to avoid rebuilding rules
This causes the `advanced_config` and `self.advanced_config` to differ without any changes to the default config in `api.py`.
This commit is contained in:
@@ -31,9 +31,8 @@ def streaming_service(config): # pylint: disable=too-many-statements,unused-arg
|
||||
patterns = items if isinstance(items, list) else [items]
|
||||
for pattern in patterns:
|
||||
if isinstance(pattern, dict):
|
||||
pattern_value = pattern.pop('pattern')
|
||||
kwargs = pattern
|
||||
pattern = pattern_value
|
||||
kwargs = dict(pattern)
|
||||
pattern = kwargs.pop('pattern')
|
||||
else:
|
||||
kwargs = {}
|
||||
regex = kwargs.pop('regex', False)
|
||||
|
||||
Reference in New Issue
Block a user