From: Philipp Hagemeister Date: Mon, 9 Dec 2013 03:31:18 +0000 (+0100) Subject: Add filename to --dump-json output (Fixes #1908) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=a0d96c9843da915bee28c29993d6e1a4e2d21d9f;p=youtube-dl Add filename to --dump-json output (Fixes #1908) --- diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index fc36be56f..3fbbf3ba0 100644 --- a/youtube_dl/YoutubeDL.py +++ b/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