瀏覽代碼

Add filename to --dump-json output (Fixes #1908)

Philipp Hagemeister 11 年之前
父節點
當前提交
a0d96c9843
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      youtube_dl/YoutubeDL.py

+ 1 - 0
youtube_dl/YoutubeDL.py

@@ -751,6 +751,7 @@ class YoutubeDL(object):
         if self.params.get('forceformat', False):
             self.to_stdout(info_dict['format'])
         if self.params.get('forcejson', False):
+            info_dict['_filename'] = filename
             self.to_stdout(json.dumps(info_dict))
 
         # Do nothing else if in simulate mode