diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-04-30 23:55:05 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-04-30 23:55:05 +0600 |
commit | 4070b458ece46a29dad9be2312a7daa48bb2f1d7 (patch) | |
tree | b67b16bbb65da04965ae85ac16ec834f484e5c60 /youtube_dl | |
parent | ffbc3901d276a4fafc9423c51dc2c6aa5d108d91 (diff) |
[YoutubeDL] Do not write requested info in info JSON file (Closes #5562, closes #5564)
Diffstat (limited to 'youtube_dl')
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 9d4a2dce8..e747c6892 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1337,8 +1337,11 @@ class YoutubeDL(object): self.to_screen('[info] Video description metadata is already present') else: self.to_screen('[info] Writing video description metadata as JSON to: ' + infofn) + filtered_info_dict = dict( + (k, v) for k, v in info_dict.items() + if not k in ['requested_formats', 'requested_subtitles']) try: - write_json_file(info_dict, infofn) + write_json_file(filtered_info_dict, infofn) except (OSError, IOError): self.report_error('Cannot write metadata to JSON file ' + infofn) return |