1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-27 13:52:50 +08:00

Reduced disk space usage of native hls downloader

This commit is contained in:
e00E 2015-10-07 13:50:21 +02:00
parent 181f814e57
commit ed2e1e9a87

View File

@ -99,14 +99,14 @@ class NativeHlsFD(FragmentFD):
success = ctx['dl'].download(frag_filename, {'url': frag_url})
if not success:
return False
down, frag_sanitized = sanitize_open(frag_filename, 'rb')
frags_filenames.append(frag_sanitized)
for frag_file in frags_filenames:
down, frag_sanitized = sanitize_open(frag_file, 'rb')
ctx['dest_stream'].write(down.read())
down.close()
frags_filenames.append(frag_sanitized)
os.remove(encodeFilename(frag_file))
self._finish_frag_download(ctx)
for frag_file in frags_filenames:
os.remove(encodeFilename(frag_file))
return True