Skip to content

Commit

Permalink
[core] Avoid deepcopy of ctx dict (fix f35b757)
Browse files Browse the repository at this point in the history
* may now contain `LazyList`s
* resolves #31999
  • Loading branch information
dirkf committed Apr 6, 2023
1 parent 9f4d83f commit d6ae3b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/YoutubeDL.py
Expand Up @@ -1399,7 +1399,7 @@ def selector_function(ctx):
filters = [self._build_format_filter(f) for f in selector.filters]

def final_selector(ctx):
ctx_copy = copy.deepcopy(ctx)
ctx_copy = dict(ctx)
for _filter in filters:
ctx_copy['formats'] = list(filter(_filter, ctx_copy['formats']))
return selector_function(ctx_copy)
Expand Down

0 comments on commit d6ae3b7

Please sign in to comment.