Add filename to --dump-json output (Fixes #1908)
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 9 Dec 2013 03:31:18 +0000 (04:31 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 9 Dec 2013 03:31:18 +0000 (04:31 +0100)
youtube_dl/YoutubeDL.py

index fc36be56f65d54f5dd12cc56f362e784182b6bd9..3fbbf3ba09f957c96b8178d01e7bfa7ac2c9df26 100644 (file)
@@ -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