1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-26 01:26:45 +00:00

[YoutubeDL] Do not write requested info in info JSON file (Closes #5562, closes #5564)

This commit is contained in:
Sergey M․ 2015-04-30 23:55:05 +06:00
parent ffbc3901d2
commit 4070b458ec

View file

@ -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