Set '--simulate' if any of the printing options is given (fixes #3036)
[youtube-dl] / youtube_dl / __init__.py
index 6b0efe059352ab252476b4df808c6cfdbfdcc121..578ecc4abc8777c45fc95daa338da993ce91f331 100644 (file)
@@ -81,6 +81,8 @@ __authors__  = (
     'lenaten',
     'Dennis Scheiba',
     'Damon Timm',
+    'winwon',
+    'Xavier Beynon'
 )
 
 __license__ = 'Public Domain'
@@ -284,7 +286,7 @@ def _real_main(argv=None):
                      u' file! Use "{0}.%(ext)s" instead of "{0}" as the output'
                      u' template'.format(outtmpl))
 
-    any_printing = opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat or opts.getduration or opts.dumpjson
+    any_printing = opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat or opts.getduration or opts.dumpjson or opts.dump_single_json
     download_archive_fn = os.path.expanduser(opts.download_archive) if opts.download_archive is not None else opts.download_archive
 
     ydl_opts = {
@@ -304,8 +306,9 @@ def _real_main(argv=None):
         'forcefilename': opts.getfilename,
         'forceformat': opts.getformat,
         'forcejson': opts.dumpjson,
-        'simulate': opts.simulate,
-        'skip_download': (opts.skip_download or opts.simulate or any_printing),
+        'dump_single_json': opts.dump_single_json,
+        'simulate': opts.simulate or any_printing,
+        'skip_download': opts.skip_download,
         'format': opts.format,
         'format_limit': opts.format_limit,
         'listformats': opts.listformats,