Skip to content

Commit

Permalink
fix(streaming_service): keep pattern to avoid rebuilding rules
Browse files Browse the repository at this point in the history
This causes the `advanced_config` and `self.advanced_config` to differ
without any changes to the default config in `api.py`.
  • Loading branch information
medariox authored and Toilal committed Feb 10, 2021
1 parent a2f48e2 commit 62f0c0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions guessit/rules/properties/streaming_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 62f0c0e

Please sign in to comment.