A feature-rich command-line audio/video downloader
[downloader/dash] Abort download immediately after giving up on some fragment
Sergey M․4a69fa04e007
diff --git a/youtube_dl/downloader/dash.py b/youtube_dl/downloader/dash.pyindex e087cf142b..efeae02a3c 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 Trueself.report_error('giving up after %s fragment retries' % fragment_retries)return False+ return Trueif initialization_url:- append_url_to_file(initialization_url, ctx['tmpfilename'], 'Init')+ if not append_url_to_file(initialization_url, ctx['tmpfilename'], 'Init'):+ return Falsefor 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 Falseself._finish_frag_download(ctx)