change logic a bit, make variable names more readable
This commit is contained in:
parent
712464e1e8
commit
a416c8a7ec
@ -646,29 +646,27 @@ class YoutubeDL(object):
|
|||||||
playlist_results.append(entry_result)
|
playlist_results.append(entry_result)
|
||||||
ie_result['entries'] = playlist_results
|
ie_result['entries'] = playlist_results
|
||||||
|
|
||||||
if download and not(self.params.get('simulate', False)) and \
|
if self.params['concat']:
|
||||||
self.params.get('concat', False):
|
|
||||||
downloaded = []
|
|
||||||
concat = FFmpegConcatPP(self)
|
concat = FFmpegConcatPP(self)
|
||||||
if not concat._get_executable():
|
if concat._get_executable():
|
||||||
|
postprocessors = [concat]
|
||||||
|
else:
|
||||||
postprocessors = []
|
postprocessors = []
|
||||||
self.report_warning('You have requested multiple '
|
self.report_warning('You have requested multiple '
|
||||||
'formats but ffmpeg or avconv are not installed.'
|
'formats but ffmpeg or avconv are not installed.'
|
||||||
' The formats won\'t be merged')
|
' The formats won\'t be merged')
|
||||||
else:
|
|
||||||
postprocessors = [concat]
|
downloaded = []
|
||||||
for f in ie_result['entries']:
|
for video in playlist_results:
|
||||||
new_info = dict(ie_result)
|
new_info = dict(ie_result)
|
||||||
new_info.update(f)
|
new_info.update(video)
|
||||||
if 'ext' in new_info: ie_result['ext'] = new_info['ext']
|
ie_result['ext'] = video['ext']
|
||||||
if 'id' in new_info: ie_result['id'] = new_info['id']
|
|
||||||
fname = self.prepare_filename(new_info)
|
fname = self.prepare_filename(new_info)
|
||||||
downloaded.append(fname)
|
downloaded.append(fname)
|
||||||
|
|
||||||
filename = self.prepare_filename(ie_result)
|
filename = self.prepare_filename(ie_result)
|
||||||
|
|
||||||
ie_result['__postprocessors'] = postprocessors
|
ie_result['__postprocessors'] = postprocessors
|
||||||
ie_result['__files_to_merge'] = downloaded
|
ie_result['__files_to_merge'] = downloaded
|
||||||
|
|
||||||
self.post_process(filename, ie_result)
|
self.post_process(filename, ie_result)
|
||||||
|
|
||||||
return ie_result
|
return ie_result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user