mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-23 11:31:47 +01:00
[core] Avoid deepcopy of ctx dict (fix f35b757
) (Pt 2)
This commit is contained in:
parent
d6ae3b77cd
commit
f8253a5289
|
@ -1389,11 +1389,10 @@ class YoutubeDL(object):
|
||||||
'abr': formats_info[1].get('abr'),
|
'abr': formats_info[1].get('abr'),
|
||||||
'ext': output_ext,
|
'ext': output_ext,
|
||||||
}
|
}
|
||||||
video_selector, audio_selector = map(_build_selector_function, selector.selector)
|
|
||||||
|
|
||||||
def selector_function(ctx):
|
def selector_function(ctx):
|
||||||
for pair in itertools.product(
|
selector_fn = lambda x: _build_selector_function(x)(ctx)
|
||||||
video_selector(copy.deepcopy(ctx)), audio_selector(copy.deepcopy(ctx))):
|
for pair in itertools.product(*map(selector_fn, selector.selector)):
|
||||||
yield _merge(pair)
|
yield _merge(pair)
|
||||||
|
|
||||||
filters = [self._build_format_filter(f) for f in selector.filters]
|
filters = [self._build_format_filter(f) for f in selector.filters]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user