aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r--yt_dlp/options.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index fd60ff55f..b81e14966 100644
--- a/yt_dlp/options.py
+++ b/yt_dlp/options.py
@@ -20,7 +20,7 @@ from .postprocessor import (
SponsorBlockPP,
)
from .postprocessor.modify_chapters import DEFAULT_SPONSORBLOCK_CHAPTER_TITLE
-from .update import detect_variant, is_non_updateable
+from .update import UPDATE_SOURCES, detect_variant, is_non_updateable
from .utils import (
OUTTMPL_TYPES,
POSTPROCESS_WHEN,
@@ -36,7 +36,7 @@ from .utils import (
remove_end,
write_string,
)
-from .version import __version__
+from .version import CHANNEL, __version__
def parseOpts(overrideArguments=None, ignore_config_files='if_override'):
@@ -326,12 +326,19 @@ def create_parser():
action='store_true', dest='update_self',
help=format_field(
is_non_updateable(), None, 'Check if updates are available. %s',
- default='Update this program to the latest version'))
+ default=f'Update this program to the latest {CHANNEL} version'))
general.add_option(
'--no-update',
action='store_false', dest='update_self',
help='Do not check for updates (default)')
general.add_option(
+ '--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 ommited; See "UPDATE" for details. '
+ f'Supported channels: {", ".join(UPDATE_SOURCES)}'))
+ general.add_option(
'-i', '--ignore-errors',
action='store_true', dest='ignoreerrors',
help='Ignore download and postprocessing errors. The download will be considered successful even if the postprocessing fails')