[downloader/dash] make initialization_url optional

This commit is contained in:
remitamine 2016-02-02 18:12:32 +01:00
parent c11875b328
commit a1a22572fb

View File

@ -40,6 +40,7 @@ def combine_url(base_url, target_url):
return '%s%s%s' % (base_url, '' if base_url.endswith('/') else '/', target_url) return '%s%s%s' % (base_url, '' if base_url.endswith('/') else '/', target_url)
with open(tmpfilename, 'wb') as outf: with open(tmpfilename, 'wb') as outf:
if info_dict.get('initialization_url'):
append_url_to_file( append_url_to_file(
outf, combine_url(base_url, info_dict['initialization_url']), outf, combine_url(base_url, info_dict['initialization_url']),
'initialization segment') 'initialization segment')