[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
This commit is contained in:
parent
58f6ab72ed
commit
75a2485407
7 changed files with 111 additions and 123 deletions
|
@ -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'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue