Skip to content

Commit

Permalink
Add --no-quiet
Browse files Browse the repository at this point in the history
Closes #6796
  • Loading branch information
pukkandan committed Apr 24, 2023
1 parent ec9311c commit d669772
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ If you fork the project on GitHub, you can run your fork's [build workflow](.git
## Verbosity and Simulation Options:
-q, --quiet Activate quiet mode. If used with --verbose,
print the log to stderr
--no-quiet Deactivate quiet mode. (Default)
--no-warnings Ignore warnings
-s, --simulate Do not download the video and do not write
anything to disk
Expand Down
3 changes: 2 additions & 1 deletion yt_dlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,8 @@ def parse_options(argv=None):
'dumpjson', 'dump_single_json', 'getdescription', 'getduration', 'getfilename',
'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']
write_playlist_infojson = (opts.writeinfojson and not opts.clean_infojson
Expand Down
6 changes: 5 additions & 1 deletion yt_dlp/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,8 +1079,12 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
verbosity = optparse.OptionGroup(parser, 'Verbosity and Simulation Options')
verbosity.add_option(
'-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')
verbosity.add_option(
'--no-quiet',
action='store_false', dest='quiet',
help='Deactivate quiet mode. (Default)')
verbosity.add_option(
'--no-warnings',
dest='no_warnings', action='store_true', default=False,
Expand Down

0 comments on commit d669772

Please sign in to comment.