projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c11875b
)
[downloader/dash] make initialization_url optional
author
remitamine
<remitamine@gmail.com>
Tue, 2 Feb 2016 17:12:32 +0000
(18:12 +0100)
committer
remitamine
<remitamine@gmail.com>
Tue, 2 Feb 2016 17:12:32 +0000
(18:12 +0100)
youtube_dl/downloader/dash.py
patch
|
blob
|
history
diff --git
a/youtube_dl/downloader/dash.py
b/youtube_dl/downloader/dash.py
index 535f2a7fc7236a5717f1b0bf0375a5876cf00226..b0070aeade03105fbad27b7ffb79cfd17c8df6bb 100644
(file)
--- a/
youtube_dl/downloader/dash.py
+++ b/
youtube_dl/downloader/dash.py
@@
-40,9
+40,10
@@
class DashSegmentsFD(FileDownloader):
return '%s%s%s' % (base_url, '' if base_url.endswith('/') else '/', target_url)
with open(tmpfilename, 'wb') as outf:
return '%s%s%s' % (base_url, '' if base_url.endswith('/') else '/', target_url)
with open(tmpfilename, 'wb') as outf:
- append_url_to_file(
- outf, combine_url(base_url, info_dict['initialization_url']),
- 'initialization segment')
+ if info_dict.get('initialization_url'):
+ append_url_to_file(
+ outf, combine_url(base_url, info_dict['initialization_url']),
+ 'initialization segment')
for i, segment_url in enumerate(segment_urls):
segment_len = append_url_to_file(
outf, combine_url(base_url, segment_url),
for i, segment_url in enumerate(segment_urls):
segment_len = append_url_to_file(
outf, combine_url(base_url, segment_url),