1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 19:54:30 -04:00

[downloader] Fix slow progress hooks

Closes #1301
This commit is contained in:
pukkandan
2021-10-16 18:31:00 +05:30
parent 48ee10ee8a
commit 03b4de722a
5 changed files with 23 additions and 21 deletions

View File

@@ -245,13 +245,12 @@ class HlsFD(FragmentFD):
fragments = [fragments[0] if fragments else None]
if real_downloader:
info_copy = info_dict.copy()
info_copy['fragments'] = fragments
info_dict['fragments'] = fragments
fd = real_downloader(self.ydl, self.params)
# TODO: Make progress updates work without hooking twice
# for ph in self._progress_hooks:
# fd.add_progress_hook(ph)
return fd.real_download(filename, info_copy)
return fd.real_download(filename, info_dict)
if is_webvtt:
def pack_fragment(frag_content, frag_index):