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,
remove_end,
write_string,
)
-from .version import __version__
+from .version import CHANNEL, __version__
def parseOpts(overrideArguments=None, ignore_config_files='if_override'):
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 omitted; See "UPDATE" for details. '
+ f'Supported channels: {", ".join(UPDATE_SOURCES)}'))
general.add_option(
'-i', '--ignore-errors',
action='store_true', dest='ignoreerrors',
'Use "--match-filter -" to interactively ask whether to download each video'))
selection.add_option(
'--no-match-filter',
- metavar='FILTER', dest='match_filter', action='store_const', const=None,
- help='Do not use generic video filter (default)')
+ dest='match_filter', action='store_const', const=None,
+ help='Do not use any --match-filter (default)')
+ selection.add_option(
+ '--break-match-filters',
+ metavar='FILTER', dest='breaking_match_filter', action='append',
+ help='Same as "--match-filters" but stops the download process when a video is rejected')
+ selection.add_option(
+ '--no-break-match-filters',
+ dest='breaking_match_filter', action='store_const', const=None,
+ help='Do not use any --break-match-filters (default)')
selection.add_option(
'--no-playlist',
action='store_true', dest='noplaylist', default=False,
selection.add_option(
'--break-on-reject',
action='store_true', dest='break_on_reject', default=False,
- help='Stop the download process when encountering a file that has been filtered out')
+ help=optparse.SUPPRESS_HELP)
selection.add_option(
'--break-per-input',
action='store_true', dest='break_per_url', default=False,
- help='Alters --max-downloads, --break-on-existing, --break-on-reject, and autonumber to reset per input URL')
+ help='Alters --max-downloads, --break-on-existing, --break-match-filter, and autonumber to reset per input URL')
selection.add_option(
'--no-break-per-input',
action='store_false', dest='break_per_url',
metavar='URL', dest='referer', default=None,
help=optparse.SUPPRESS_HELP)
workarounds.add_option(
- '--add-header',
+ '--add-headers',
metavar='FIELD:VALUE', dest='headers', default={}, type='str',
action='callback', callback=_dict_from_options_callback,
callback_kwargs={'multiple_keys': False},