A feature-rich command-line audio/video downloader
Fix concurrent formats downloading to stdout (#15617)
N/Ame5bf91072bcfb
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.pyindex cf3e0837c0..7db6303d4f 100644--- a/yt_dlp/YoutubeDL.py+++ b/yt_dlp/YoutubeDL.py@@ -3481,11 +3481,12 @@ class YoutubeDL:if dl_filename is not None:self.report_file_already_downloaded(dl_filename)elif fd:- for f in info_dict['requested_formats'] if fd != FFmpegFD else []:- f['filepath'] = fname = prepend_extension(- correct_ext(temp_filename, info_dict['ext']),- 'f{}'.format(f['format_id']), info_dict['ext'])- downloaded.append(fname)+ if fd != FFmpegFD and temp_filename != '-':+ for f in info_dict['requested_formats']:+ f['filepath'] = fname = prepend_extension(+ correct_ext(temp_filename, info_dict['ext']),+ 'f{}'.format(f['format_id']), info_dict['ext'])+ downloaded.append(fname)info_dict['url'] = '\n'.join(f['url'] for f in info_dict['requested_formats'])success, real_download = self.dl(temp_filename, info_dict)info_dict['__real_download'] = real_download