mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
parent
dac5df5a98
commit
013b50b794
1 changed files with 8 additions and 5 deletions
|
@ -633,11 +633,14 @@ def check_deprecated(param, option, suggestion):
|
|||
pp = pp_class(self, **compat_kwargs(pp_def))
|
||||
self.add_post_processor(pp, when=when)
|
||||
|
||||
for ph in self.params.get('post_hooks', []):
|
||||
self.add_post_hook(ph)
|
||||
|
||||
for ph in self.params.get('progress_hooks', []):
|
||||
self.add_progress_hook(ph)
|
||||
hooks = {
|
||||
'post_hooks': self.add_post_hook,
|
||||
'progress_hooks': self.add_progress_hook,
|
||||
'postprocessor_hooks': self.add_postprocessor_hook,
|
||||
}
|
||||
for opt, fn in hooks.items():
|
||||
for ph in self.params.get(opt, []):
|
||||
fn(ph)
|
||||
|
||||
register_socks_protocols()
|
||||
|
||||
|
|
Loading…
Reference in a new issue