diff options
author | Jesús <heckyel@hyperbola.info> | 2021-12-07 12:26:51 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-12-07 12:26:51 -0500 |
commit | 495746b9a6d4d32ddfa39ed908092d90a7cd5f3f (patch) | |
tree | 4845e40905136556b7513b9f36e3a70e505ee4c9 /yt_dlp/YoutubeDL.py | |
parent | 25831c5572c6e1d45bc05a122312516e0d264f8d (diff) | |
parent | ddd24c99493483bde822944e8063064f53464ac1 (diff) | |
download | hypervideo-pre-495746b9a6d4d32ddfa39ed908092d90a7cd5f3f.tar.lz hypervideo-pre-495746b9a6d4d32ddfa39ed908092d90a7cd5f3f.tar.xz hypervideo-pre-495746b9a6d4d32ddfa39ed908092d90a7cd5f3f.zip |
updated from upstream | 07/12/2021 at 12:26
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 45500ab5a..e953916d5 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1370,11 +1370,11 @@ class YoutubeDL(object): min_wait, max_wait = self.params.get('wait_for_video') diff = try_get(ie_result, lambda x: x['release_timestamp'] - time.time()) if diff is None and ie_result.get('live_status') == 'is_upcoming': - diff = random.randrange(min_wait or 0, max_wait) if max_wait else min_wait + diff = random.randrange(min_wait, max_wait) if (max_wait and min_wait) else (max_wait or min_wait) self.report_warning('Release time of video is not known') elif (diff or 0) <= 0: self.report_warning('Video should already be available according to extracted info') - diff = min(max(diff, min_wait or 0), max_wait or float('inf')) + diff = min(max(diff or 0, min_wait or 0), max_wait or float('inf')) self.to_screen(f'[wait] Waiting for {format_dur(diff)} - Press Ctrl+C to try now') wait_till = time.time() + diff @@ -1453,6 +1453,7 @@ class YoutubeDL(object): info_copy['id'] = ie.get_temp_id(ie_result['url']) self.add_default_extra_info(info_copy, ie, ie_result['url']) self.add_extra_info(info_copy, extra_info) + info_copy, _ = self.pre_process(info_copy) self.__forced_printings(info_copy, self.prepare_filename(info_copy), incomplete=True) if self.params.get('force_write_download_archive', False): self.record_download_archive(info_copy) |