diff options
author | shirt-dev <2660574+shirt-dev@users.noreply.github.com> | 2021-03-10 09:39:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 20:09:40 +0530 |
commit | d7009caa03b48360541e0770a9231ba71f429308 (patch) | |
tree | 032a1712ebe8571c4a0fbc6b8ab0c967e572906e /yt_dlp/downloader/dash.py | |
parent | 54759df58626913a0ed0c96ee35615921668b8b2 (diff) | |
download | hypervideo-pre-d7009caa03b48360541e0770a9231ba71f429308.tar.lz hypervideo-pre-d7009caa03b48360541e0770a9231ba71f429308.tar.xz hypervideo-pre-d7009caa03b48360541e0770a9231ba71f429308.zip |
Improve HLS/DASH external downloader code (#162)
Authored by: shirt
Diffstat (limited to 'yt_dlp/downloader/dash.py')
-rw-r--r-- | yt_dlp/downloader/dash.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/yt_dlp/downloader/dash.py b/yt_dlp/downloader/dash.py index d758282c1..99acc8db2 100644 --- a/yt_dlp/downloader/dash.py +++ b/yt_dlp/downloader/dash.py @@ -37,7 +37,7 @@ class DashSegmentsFD(FragmentFD): fragment_retries = self.params.get('fragment_retries', 0) skip_unavailable_fragments = self.params.get('skip_unavailable_fragments', True) - fragment_urls = [] + fragments = [] frag_index = 0 for i, fragment in enumerate(fragments): frag_index += 1 @@ -49,7 +49,9 @@ class DashSegmentsFD(FragmentFD): fragment_url = urljoin(fragment_base_url, fragment['path']) if real_downloader: - fragment_urls.append(fragment_url) + fragments.append({ + 'url': fragment_url, + }) continue # In DASH, the first segment contains necessary headers to @@ -90,7 +92,7 @@ class DashSegmentsFD(FragmentFD): if real_downloader: info_copy = info_dict.copy() - info_copy['url_list'] = fragment_urls + info_copy['fragments'] = fragments fd = real_downloader(self.ydl, self.params) # TODO: Make progress updates work without hooking twice # for ph in self._progress_hooks: |