aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/options.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-12-10 13:41:45 -0500
committerJesús <heckyel@hyperbola.info>2021-12-10 13:41:45 -0500
commit3a9fe880dddb69cfca33c8438683b69833139cd6 (patch)
treec43bb991c3291e6f54e3c72f2bd416c270c4cbe3 /yt_dlp/options.py
parentab2840d99fe752985fb1259a1a364f591f955d89 (diff)
parentaa4b0545120becc11a5992384ce52c943da8ead5 (diff)
downloadhypervideo-pre-3a9fe880dddb69cfca33c8438683b69833139cd6.tar.lz
hypervideo-pre-3a9fe880dddb69cfca33c8438683b69833139cd6.tar.xz
hypervideo-pre-3a9fe880dddb69cfca33c8438683b69833139cd6.zip
updated from upstream | 10/12/2021 at 13:41
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r--yt_dlp/options.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index 120084046..85c7c8cda 100644
--- a/yt_dlp/options.py
+++ b/yt_dlp/options.py
@@ -1461,20 +1461,29 @@ def parseOpts(overrideArguments=None):
sponsorblock.add_option(
'--sponsorblock-mark', metavar='CATS',
dest='sponsorblock_mark', default=set(), action='callback', type='str',
- callback=_set_from_options_callback, callback_kwargs={'allowed_values': SponsorBlockPP.CATEGORIES.keys()},
- help=(
+ callback=_set_from_options_callback, callback_kwargs={
+ 'allowed_values': SponsorBlockPP.CATEGORIES.keys(),
+ 'aliases': {'default': ['all']}
+ }, help=(
'SponsorBlock categories to create chapters for, separated by commas. '
- 'Available categories are all, %s. You can prefix the category with a "-" to exempt it. '
- 'See https://wiki.sponsor.ajay.app/index.php/Segment_Categories for description of the categories. '
- 'Eg: --sponsorblock-mark all,-preview' % ', '.join(SponsorBlockPP.CATEGORIES.keys())))
+ f'Available categories are all, default(=all), {", ".join(SponsorBlockPP.CATEGORIES.keys())}. '
+ 'You can prefix the category with a "-" to exempt it. See [1] for description of the categories. '
+ 'Eg: --sponsorblock-mark all,-preview [1] https://wiki.sponsor.ajay.app/w/Segment_Categories'))
sponsorblock.add_option(
'--sponsorblock-remove', metavar='CATS',
dest='sponsorblock_remove', default=set(), action='callback', type='str',
- callback=_set_from_options_callback, callback_kwargs={'allowed_values': SponsorBlockPP.CATEGORIES.keys()},
- help=(
+ callback=_set_from_options_callback, callback_kwargs={
+ 'allowed_values': set(SponsorBlockPP.CATEGORIES.keys()) - set(SponsorBlockPP.POI_CATEGORIES.keys()),
+ # Note: From https://wiki.sponsor.ajay.app/w/Types:
+ # The filler category is very aggressive.
+ # It is strongly recommended to not use this in a client by default.
+ 'aliases': {'default': ['all', '-filler']}
+ }, help=(
'SponsorBlock categories to be removed from the video file, separated by commas. '
'If a category is present in both mark and remove, remove takes precedence. '
- 'The syntax and available categories are the same as for --sponsorblock-mark'))
+ 'The syntax and available categories are the same as for --sponsorblock-mark '
+ 'except that "default" refers to "all,-filler" '
+ f'and {", ".join(SponsorBlockPP.POI_CATEGORIES.keys())} is not available'))
sponsorblock.add_option(
'--sponsorblock-chapter-title', metavar='TEMPLATE',
default=DEFAULT_SPONSORBLOCK_CHAPTER_TITLE, dest='sponsorblock_chapter_title',