mirror of
https://source.netsyms.com/Mirrors/youtube-dl
synced 2024-11-03 03:40:20 +00:00
YoutubeDL.post_process: simplify keep_video handling
Since keep_video started as None we always set it to keep_video_wish unless it was None, so in the end keep_video == keep_video_wish. This should have been changed in f3ff1a3696
, but I didn't notice it.
This commit is contained in:
parent
ce81b1411d
commit
ecc6bd1341
@ -1486,16 +1486,9 @@ class YoutubeDL(object):
|
|||||||
pps_chain.extend(ie_info['__postprocessors'])
|
pps_chain.extend(ie_info['__postprocessors'])
|
||||||
pps_chain.extend(self._pps)
|
pps_chain.extend(self._pps)
|
||||||
for pp in pps_chain:
|
for pp in pps_chain:
|
||||||
keep_video = None
|
|
||||||
old_filename = info['filepath']
|
old_filename = info['filepath']
|
||||||
try:
|
try:
|
||||||
keep_video_wish, info = pp.run(info)
|
keep_video, info = pp.run(info)
|
||||||
if keep_video_wish is not None:
|
|
||||||
if keep_video_wish:
|
|
||||||
keep_video = keep_video_wish
|
|
||||||
elif keep_video is None:
|
|
||||||
# No clear decision yet, let IE decide
|
|
||||||
keep_video = keep_video_wish
|
|
||||||
except PostProcessingError as e:
|
except PostProcessingError as e:
|
||||||
self.report_error(e.msg)
|
self.report_error(e.msg)
|
||||||
if keep_video is False and not self.params.get('keepvideo', False):
|
if keep_video is False and not self.params.get('keepvideo', False):
|
||||||
|
Loading…
Reference in New Issue
Block a user