From d2a1fad9689cf866309c9de9c5b06adb73a8a943 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Thu, 13 May 2021 17:09:43 +0530 Subject: [PATCH] [compat] Fix py2 --- yt_dlp/__init__.py | 4 ++-- yt_dlp/options.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 16b1e9a2e..00a28128d 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -321,7 +321,7 @@ def _real_main(argv=None): if re.match(MetadataFromFieldPP.regex, f) is None: parser.error('invalid format string "%s" specified for --parse-metadata' % f) - any_getting = opts.print or 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 + any_getting = opts.forceprint or 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 any_printing = opts.print_json download_archive_fn = expand_path(opts.download_archive) if opts.download_archive is not None else opts.download_archive @@ -508,7 +508,7 @@ def _real_main(argv=None): 'forceduration': opts.getduration, 'forcefilename': opts.getfilename, 'forceformat': opts.getformat, - 'forceprint': opts.print, + 'forceprint': opts.forceprint, 'forcejson': opts.dumpjson or opts.print_json, 'dump_single_json': opts.dump_single_json, 'force_write_download_archive': opts.force_write_download_archive, diff --git a/yt_dlp/options.py b/yt_dlp/options.py index 26e54f1f6..b99d5d202 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -790,7 +790,7 @@ def parseOpts(overrideArguments=None): help='Do not download the video but write all related files (Alias: --no-download)') verbosity.add_option( '-O', '--print', metavar='TEMPLATE', - action='callback', dest='print', type='str', default=[], + action='callback', dest='forceprint', type='str', default=[], callback=_list_from_options_callback, callback_kwargs={'delim': None}, help=( 'Simulate, quiet but print the given fields. Either a field name '