diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-08-30 22:28:14 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-09-03 17:51:48 +0700 |
commit | 4a69fa04e0074a3d5938ffb03decff9cc33f5d3d (patch) | |
tree | 8738535d40cfefa32ce2c562fb9e6ab0ba76d7b4 /youtube_dl/downloader | |
parent | 2e99cd30c3108fd8da6a9f9fadfa89852c8d8826 (diff) |
[downloader/dash] Abort download immediately after giving up on some fragment
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r-- | youtube_dl/downloader/dash.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/downloader/dash.py b/youtube_dl/downloader/dash.py index e087cf142..efeae02a3 100644 --- a/youtube_dl/downloader/dash.py +++ b/youtube_dl/downloader/dash.py @@ -66,14 +66,17 @@ class DashSegmentsFD(FragmentFD): if count > fragment_retries: if skip_unavailable_fragments: self.report_skip_fragment(segment_name) - return + return True self.report_error('giving up after %s fragment retries' % fragment_retries) return False + return True if initialization_url: - append_url_to_file(initialization_url, ctx['tmpfilename'], 'Init') + if not append_url_to_file(initialization_url, ctx['tmpfilename'], 'Init'): + return False for i, segment_url in enumerate(segment_urls): - append_url_to_file(segment_url, ctx['tmpfilename'], 'Seg%d' % i) + if not append_url_to_file(segment_url, ctx['tmpfilename'], 'Seg%d' % i): + return False self._finish_frag_download(ctx) |