diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-12-30 11:15:41 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-12-30 11:18:45 +0530 |
commit | 119e40ef64b25f66a39246e87ce6c143cd34276d (patch) | |
tree | 9431945fa49dfbefa65abd3238b194c65246ffe8 /yt_dlp/YoutubeDL.py | |
parent | 4455918e7f090ace0b0c2537bbfd364956eb66cb (diff) | |
download | hypervideo-pre-119e40ef64b25f66a39246e87ce6c143cd34276d.tar.lz hypervideo-pre-119e40ef64b25f66a39246e87ce6c143cd34276d.tar.xz hypervideo-pre-119e40ef64b25f66a39246e87ce6c143cd34276d.zip |
Add pre-processor stage `video`
Related: #456, #5808
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 17f37a643..505732327 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2977,6 +2977,16 @@ class YoutubeDL: # Does nothing under normal operation - for backward compatibility of process_info self.post_extract(info_dict) + + def replace_info_dict(new_info): + nonlocal info_dict + if new_info == info_dict: + return + info_dict.clear() + info_dict.update(new_info) + + new_info, _ = self.pre_process(info_dict, 'video') + replace_info_dict(new_info) self._num_downloads += 1 # info_dict['_filename'] needs to be set for backward compatibility @@ -3090,13 +3100,6 @@ class YoutubeDL: for link_type, should_write in write_links.items()): return - def replace_info_dict(new_info): - nonlocal info_dict - if new_info == info_dict: - return - info_dict.clear() - info_dict.update(new_info) - new_info, files_to_move = self.pre_process(info_dict, 'before_dl', files_to_move) replace_info_dict(new_info) |