Add --no-quiet

Closes #6796
This commit is contained in:
pukkandan 2023-04-24 18:52:09 +05:30
parent ec9311c41b
commit d669772c65
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
3 changed files with 8 additions and 2 deletions

View file

@ -752,6 +752,7 @@ ## Internet Shortcut Options:
## Verbosity and Simulation Options: ## Verbosity and Simulation Options:
-q, --quiet Activate quiet mode. If used with --verbose, -q, --quiet Activate quiet mode. If used with --verbose,
print the log to stderr print the log to stderr
--no-quiet Deactivate quiet mode. (Default)
--no-warnings Ignore warnings --no-warnings Ignore warnings
-s, --simulate Do not download the video and do not write -s, --simulate Do not download the video and do not write
anything to disk anything to disk

View file

@ -704,7 +704,8 @@ def parse_options(argv=None):
'dumpjson', 'dump_single_json', 'getdescription', 'getduration', 'getfilename', 'dumpjson', 'dump_single_json', 'getdescription', 'getduration', 'getfilename',
'getformat', 'getid', 'getthumbnail', 'gettitle', 'geturl' 'getformat', 'getid', 'getthumbnail', 'gettitle', 'geturl'
)) ))
opts.quiet = opts.quiet or any_getting or opts.print_json or bool(opts.forceprint) if opts.quiet is None:
opts.quiet = any_getting or opts.print_json or bool(opts.forceprint)
playlist_pps = [pp for pp in postprocessors if pp.get('when') == 'playlist'] playlist_pps = [pp for pp in postprocessors if pp.get('when') == 'playlist']
write_playlist_infojson = (opts.writeinfojson and not opts.clean_infojson write_playlist_infojson = (opts.writeinfojson and not opts.clean_infojson

View file

@ -1079,8 +1079,12 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
verbosity = optparse.OptionGroup(parser, 'Verbosity and Simulation Options') verbosity = optparse.OptionGroup(parser, 'Verbosity and Simulation Options')
verbosity.add_option( verbosity.add_option(
'-q', '--quiet', '-q', '--quiet',
action='store_true', dest='quiet', default=False, action='store_true', dest='quiet', default=None,
help='Activate quiet mode. If used with --verbose, print the log to stderr') help='Activate quiet mode. If used with --verbose, print the log to stderr')
verbosity.add_option(
'--no-quiet',
action='store_false', dest='quiet',
help='Deactivate quiet mode. (Default)')
verbosity.add_option( verbosity.add_option(
'--no-warnings', '--no-warnings',
dest='no_warnings', action='store_true', default=False, dest='no_warnings', action='store_true', default=False,