]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/options.py
[update] Implement `--update-to` repo
[yt-dlp.git] / yt_dlp / options.py
index dc46ce998452d2e277dadb4a72066c0d10e07fef..838d79fcb12a1ecebfea5b23d03e3f3b21994df8 100644 (file)
@@ -323,7 +323,7 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
         help='Print program version and exit')
     general.add_option(
         '-U', '--update',
-        action='store_true', dest='update_self',
+        action='store_const', dest='update_self', const=CHANNEL,
         help=format_field(
             is_non_updateable(), None, 'Check if updates are available. %s',
             default=f'Update this program to the latest {CHANNEL} version'))
@@ -335,9 +335,9 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
         '--update-to',
         action='store', dest='update_self', metavar='[CHANNEL]@[TAG]',
         help=(
-            'Upgrade/downgrade to a specific version. CHANNEL and TAG defaults to '
-            f'"{CHANNEL}" and "latest" respectively if omitted; See "UPDATE" for details. '
-            f'Supported channels: {", ".join(UPDATE_SOURCES)}'))
+            'Upgrade/downgrade to a specific version. CHANNEL can be a repository as well. '
+            f'CHANNEL and TAG default to "{CHANNEL.partition("@")[0]}" and "latest" respectively if omitted; '
+            f'See "UPDATE" for details. Supported channels: {", ".join(UPDATE_SOURCES)}'))
     general.add_option(
         '-i', '--ignore-errors',
         action='store_true', dest='ignoreerrors',