diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-05-11 14:25:31 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-05-11 14:25:31 +0530 |
commit | 41712218233ae144d55f841818df9c63d2bd23d3 (patch) | |
tree | da46e9f4b85125c57a8daf949161dd50c5ad1bb5 /yt_dlp | |
parent | eaeca38fc4790257cc16fc77f1d06d89156a5b2c (diff) | |
download | hypervideo-pre-41712218233ae144d55f841818df9c63d2bd23d3.tar.lz hypervideo-pre-41712218233ae144d55f841818df9c63d2bd23d3.tar.xz hypervideo-pre-41712218233ae144d55f841818df9c63d2bd23d3.zip |
Add compat-option `no-attach-infojson`
Diffstat (limited to 'yt_dlp')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 2 | ||||
-rw-r--r-- | yt_dlp/__init__.py | 2 | ||||
-rw-r--r-- | yt_dlp/postprocessor/ffmpeg.py | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 3cf86cee7..c51be22cb 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -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 diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 356772b1d..f1bdc1b76 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -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() diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index 0e160f5dc..78a80f3f8 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -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: |