]> jfr.im git - yt-dlp.git/commitdiff
[compat] Fix py2
authorpukkandan <redacted>
Thu, 13 May 2021 11:39:43 +0000 (17:09 +0530)
committerpukkandan <redacted>
Fri, 14 May 2021 08:05:13 +0000 (13:35 +0530)
yt_dlp/__init__.py
yt_dlp/options.py

index 16b1e9a2e656b2f8eaede7c959e6919f99160b59..00a28128d2cfdde66a81a5326ae5f47fdd5d678a 100644 (file)
@@ -321,7 +321,7 @@ def set_default_compat(compat_name, opt_name, default=True, remove_compat=False)
         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 report_args_compat(arg, name):
         '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,
index 26e54f1f614353f4511eb95480cbad5cc1f765fc..b99d5d202615848d6a3612775c6b45c361767ca1 100644 (file)
@@ -790,7 +790,7 @@ def _dict_from_options_callback(
         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 '