mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-04 15:14:50 +00:00
Add compat-option no-attach-infojson
This commit is contained in:
@@ -386,7 +386,7 @@ class YoutubeDL(object):
|
||||
if True, otherwise use ffmpeg/avconv if False, otherwise
|
||||
use downloader suggested by extractor if None.
|
||||
compat_opts: Compatibility options. See "Differences in default behavior".
|
||||
Note that only format-sort, format-spec, no-live-chat,
|
||||
Note that only format-sort, format-spec, no-live-chat, no-attach-infojson
|
||||
playlist-index, list-formats, no-youtube-channel-redirect
|
||||
and no-youtube-unavailable-videos works when used via the API
|
||||
|
||||
|
@@ -260,7 +260,7 @@ def _real_main(argv=None):
|
||||
all_compat_opts = [
|
||||
'filename', 'format-sort', 'abort-on-error', 'format-spec', 'multistreams',
|
||||
'no-playlist-metafiles', 'no-live-chat', 'playlist-index', 'list-formats',
|
||||
'no-youtube-channel-redirect', 'no-youtube-unavailable-videos',
|
||||
'no-youtube-channel-redirect', 'no-youtube-unavailable-videos', 'no-attach-info-json',
|
||||
]
|
||||
compat_opts = parse_compat_opts()
|
||||
|
||||
|
@@ -605,7 +605,8 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
|
||||
in_filenames.append(metadata_filename)
|
||||
options.extend(['-map_metadata', '1'])
|
||||
|
||||
if '__infojson_filename' in info and info['ext'] in ('mkv', 'mka'):
|
||||
if ('no-attach-info-json' not in self.get_param('compat_opts', [])
|
||||
and '__infojson_filename' in info and info['ext'] in ('mkv', 'mka')):
|
||||
old_stream, new_stream = self.get_stream_number(
|
||||
filename, ('tags', 'mimetype'), 'application/json')
|
||||
if old_stream is not None:
|
||||
|
Reference in New Issue
Block a user