projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2e99cd3
)
[downloader/dash] Abort download immediately after giving up on some fragment
author
Sergey M․
<dstftw@gmail.com>
Tue, 30 Aug 2016 15:28:14 +0000
(22:28 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 3 Sep 2016 10:51:48 +0000
(17:51 +0700)
youtube_dl/downloader/dash.py
patch
|
blob
|
history
diff --git
a/youtube_dl/downloader/dash.py
b/youtube_dl/downloader/dash.py
index e087cf142b1a422e644bbe42e73449a0bd0fe885..efeae02a3c91fd163addd111096976b1dd9e4e40 100644
(file)
--- 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)
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
self.report_error('giving up after %s fragment retries' % fragment_retries)
return False
+ return True
if initialization_url:
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):
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)
self._finish_frag_download(ctx)