mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-03 23:43:21 -04:00
@@ -688,6 +688,21 @@ def parse_options(argv=None):
|
||||
'getformat', 'getid', 'getthumbnail', 'gettitle', 'geturl'
|
||||
))
|
||||
|
||||
playlist_pps = [pp for pp in postprocessors if pp.get('when') == 'playlist']
|
||||
write_playlist_infojson = (opts.writeinfojson and not opts.clean_infojson
|
||||
and opts.allow_playlist_files and opts.outtmpl.get('pl_infojson') != '')
|
||||
if not any((
|
||||
opts.extract_flat,
|
||||
opts.dump_single_json,
|
||||
opts.forceprint.get('playlist'),
|
||||
opts.print_to_file.get('playlist'),
|
||||
write_playlist_infojson,
|
||||
)):
|
||||
if not playlist_pps:
|
||||
opts.extract_flat = 'discard'
|
||||
elif playlist_pps == [{'key': 'FFmpegConcat', 'only_multi_video': True, 'when': 'playlist'}]:
|
||||
opts.extract_flat = 'discard_in_playlist'
|
||||
|
||||
final_ext = (
|
||||
opts.recodevideo if opts.recodevideo in FFmpegVideoConvertorPP.SUPPORTED_EXTS
|
||||
else opts.remuxvideo if opts.remuxvideo in FFmpegVideoRemuxerPP.SUPPORTED_EXTS
|
||||
|
Reference in New Issue
Block a user