mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 13:21:06 +00:00
parent
19188702ef
commit
5bfc8bee5a
@ -634,13 +634,6 @@ class YoutubeDL(object):
|
|||||||
self.print_debug_header()
|
self.print_debug_header()
|
||||||
self.add_default_info_extractors()
|
self.add_default_info_extractors()
|
||||||
|
|
||||||
for pp_def_raw in self.params.get('postprocessors', []):
|
|
||||||
pp_def = dict(pp_def_raw)
|
|
||||||
when = pp_def.pop('when', 'post_process')
|
|
||||||
pp_class = get_postprocessor(pp_def.pop('key'))
|
|
||||||
pp = pp_class(self, **compat_kwargs(pp_def))
|
|
||||||
self.add_post_processor(pp, when=when)
|
|
||||||
|
|
||||||
hooks = {
|
hooks = {
|
||||||
'post_hooks': self.add_post_hook,
|
'post_hooks': self.add_post_hook,
|
||||||
'progress_hooks': self.add_progress_hook,
|
'progress_hooks': self.add_progress_hook,
|
||||||
@ -650,6 +643,13 @@ class YoutubeDL(object):
|
|||||||
for ph in self.params.get(opt, []):
|
for ph in self.params.get(opt, []):
|
||||||
fn(ph)
|
fn(ph)
|
||||||
|
|
||||||
|
for pp_def_raw in self.params.get('postprocessors', []):
|
||||||
|
pp_def = dict(pp_def_raw)
|
||||||
|
when = pp_def.pop('when', 'post_process')
|
||||||
|
self.add_post_processor(
|
||||||
|
get_postprocessor(pp_def.pop('key'))(self, **compat_kwargs(pp_def)),
|
||||||
|
when=when)
|
||||||
|
|
||||||
register_socks_protocols()
|
register_socks_protocols()
|
||||||
|
|
||||||
def preload_download_archive(fn):
|
def preload_download_archive(fn):
|
||||||
@ -736,6 +736,9 @@ class YoutubeDL(object):
|
|||||||
def add_postprocessor_hook(self, ph):
|
def add_postprocessor_hook(self, ph):
|
||||||
"""Add the postprocessing progress hook"""
|
"""Add the postprocessing progress hook"""
|
||||||
self._postprocessor_hooks.append(ph)
|
self._postprocessor_hooks.append(ph)
|
||||||
|
for pps in self._pps.values():
|
||||||
|
for pp in pps:
|
||||||
|
pp.add_progress_hook(ph)
|
||||||
|
|
||||||
def _bidi_workaround(self, message):
|
def _bidi_workaround(self, message):
|
||||||
if not hasattr(self, '_output_channel'):
|
if not hasattr(self, '_output_channel'):
|
||||||
|
Loading…
Reference in New Issue
Block a user