diff options
author | Remita Amine <remitamine@gmail.com> | 2016-06-28 18:07:50 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2017-04-19 11:46:07 +0100 |
commit | 75a24854073e590f4efc9f037b57dee348f52b61 (patch) | |
tree | 8ccc05313462f98128ff03da3912b2fa828df2f0 /youtube_dl/downloader/http.py | |
parent | 58f6ab72ed74c2ab1b6d3885ef2c407465d8c6c2 (diff) |
[fragment,hls,f4m,dash,ism] improve fragment downloading
- resume immediately
- no need to concatenate segments and decrypt them on every resume
- no need to save temp files for segments
and for hls downloader:
- no need to download keys for segments that already downloaded
Diffstat (limited to 'youtube_dl/downloader/http.py')
-rw-r--r-- | youtube_dl/downloader/http.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py index af405b950..2896a17af 100644 --- a/youtube_dl/downloader/http.py +++ b/youtube_dl/downloader/http.py @@ -20,10 +20,14 @@ from ..utils import ( class HttpFD(FileDownloader): - def real_download(self, filename, info_dict): + def real_download(self, filename_or_stream, info_dict): url = info_dict['url'] - tmpfilename = self.temp_name(filename) + filename = filename_or_stream stream = None + if hasattr(filename_or_stream, 'write'): + stream = filename_or_stream + filename = '-' + tmpfilename = self.temp_name(filename) # Do not include the Accept-Encoding header headers = {'Youtubedl-no-compression': 'True'} |