mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 03:10:38 +00:00
[fragment] Return status of download correctly
This commit is contained in:
parent
412cce82b0
commit
8e897ed283
@ -57,9 +57,6 @@ class DashSegmentsFD(FragmentFD):
|
||||
# TODO: Make progress updates work without hooking twice
|
||||
# for ph in self._progress_hooks:
|
||||
# fd.add_progress_hook(ph)
|
||||
success = fd.real_download(filename, info_copy)
|
||||
if not success:
|
||||
return False
|
||||
return fd.real_download(filename, info_copy)
|
||||
else:
|
||||
self.download_and_append_fragments(ctx, fragments_to_download, info_dict)
|
||||
return True
|
||||
return self.download_and_append_fragments(ctx, fragments_to_download, info_dict)
|
||||
|
@ -428,3 +428,4 @@ class FragmentFD(FileDownloader):
|
||||
return False
|
||||
|
||||
self._finish_frag_download(ctx)
|
||||
return True
|
||||
|
@ -250,9 +250,7 @@ class HlsFD(FragmentFD):
|
||||
# TODO: Make progress updates work without hooking twice
|
||||
# for ph in self._progress_hooks:
|
||||
# fd.add_progress_hook(ph)
|
||||
success = fd.real_download(filename, info_copy)
|
||||
if not success:
|
||||
return False
|
||||
return fd.real_download(filename, info_copy)
|
||||
else:
|
||||
if is_webvtt:
|
||||
def pack_fragment(frag_content, frag_index):
|
||||
@ -323,5 +321,4 @@ class HlsFD(FragmentFD):
|
||||
return output.getvalue().encode('utf-8')
|
||||
else:
|
||||
pack_fragment = None
|
||||
self.download_and_append_fragments(ctx, fragments, info_dict, pack_fragment)
|
||||
return True
|
||||
return self.download_and_append_fragments(ctx, fragments, info_dict, pack_fragment)
|
||||
|
Loading…
Reference in New Issue
Block a user