]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/downloader/external.py
Native concurrent downloading of fragments (#166)
[yt-dlp.git] / yt_dlp / downloader / external.py
index c315deb2e9e8d5b146158ebbfcb4bc26502c87ba..7c2d56d9c9058e08ef0ed410548c71f919c160c0 100644 (file)
@@ -126,7 +126,7 @@ def _call_downloader(self, tmpfilename, info_dict):
             file_list = []
             dest, _ = sanitize_open(tmpfilename, 'wb')
             for i, fragment in enumerate(info_dict['fragments']):
-                file = '%s_%s.frag' % (tmpfilename, i)
+                file = '%s-Frag%d' % (tmpfilename, i)
                 decrypt_info = fragment.get('decrypt_info')
                 src, _ = sanitize_open(file, 'rb')
                 if decrypt_info:
@@ -274,7 +274,7 @@ def _make_cmd(self, tmpfilename, info_dict):
             url_list_file = '%s.frag.urls' % tmpfilename
             url_list = []
             for i, fragment in enumerate(info_dict['fragments']):
-                tmpsegmentname = '%s_%s.frag' % (os.path.basename(tmpfilename), i)
+                tmpsegmentname = '%s-Frag%d' % (os.path.basename(tmpfilename), i)
                 url_list.append('%s\n\tout=%s' % (fragment['url'], tmpsegmentname))
             stream, _ = sanitize_open(url_list_file, 'wb')
             stream.write('\n'.join(url_list).encode('utf-8'))