mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-24 08:42:30 +00:00
Add filename to --dump-json output (Fixes #1908)
This commit is contained in:
parent
2a18bc9a4b
commit
a0d96c9843
1 changed files with 1 additions and 0 deletions
|
@ -751,6 +751,7 @@ class YoutubeDL(object):
|
||||||
if self.params.get('forceformat', False):
|
if self.params.get('forceformat', False):
|
||||||
self.to_stdout(info_dict['format'])
|
self.to_stdout(info_dict['format'])
|
||||||
if self.params.get('forcejson', False):
|
if self.params.get('forcejson', False):
|
||||||
|
info_dict['_filename'] = filename
|
||||||
self.to_stdout(json.dumps(info_dict))
|
self.to_stdout(json.dumps(info_dict))
|
||||||
|
|
||||||
# Do nothing else if in simulate mode
|
# Do nothing else if in simulate mode
|
||||||
|
|
Loading…
Reference in a new issue