|
|
@ -1465,20 +1465,29 @@ def parseOpts(overrideArguments=None):
|
|
|
|
sponsorblock.add_option(
|
|
|
|
sponsorblock.add_option(
|
|
|
|
'--sponsorblock-mark', metavar='CATS',
|
|
|
|
'--sponsorblock-mark', metavar='CATS',
|
|
|
|
dest='sponsorblock_mark', default=set(), action='callback', type='str',
|
|
|
|
dest='sponsorblock_mark', default=set(), action='callback', type='str',
|
|
|
|
callback=_set_from_options_callback, callback_kwargs={'allowed_values': SponsorBlockPP.CATEGORIES.keys()},
|
|
|
|
callback=_set_from_options_callback, callback_kwargs={
|
|
|
|
help=(
|
|
|
|
'allowed_values': SponsorBlockPP.CATEGORIES.keys(),
|
|
|
|
|
|
|
|
'aliases': {'default': ['all']}
|
|
|
|
|
|
|
|
}, help=(
|
|
|
|
'SponsorBlock categories to create chapters for, separated by commas. '
|
|
|
|
'SponsorBlock categories to create chapters for, separated by commas. '
|
|
|
|
'Available categories are all, %s. You can prefix the category with a "-" to exempt it. '
|
|
|
|
f'Available categories are all, default(=all), {", ".join(SponsorBlockPP.CATEGORIES.keys())}. '
|
|
|
|
'See https://wiki.sponsor.ajay.app/index.php/Segment_Categories for description of the categories. '
|
|
|
|
'You can prefix the category with a "-" to exempt it. See [1] for description of the categories. '
|
|
|
|
'Eg: --sponsorblock-mark all,-preview' % ', '.join(SponsorBlockPP.CATEGORIES.keys())))
|
|
|
|
'Eg: --sponsorblock-mark all,-preview [1] https://wiki.sponsor.ajay.app/w/Segment_Categories'))
|
|
|
|
sponsorblock.add_option(
|
|
|
|
sponsorblock.add_option(
|
|
|
|
'--sponsorblock-remove', metavar='CATS',
|
|
|
|
'--sponsorblock-remove', metavar='CATS',
|
|
|
|
dest='sponsorblock_remove', default=set(), action='callback', type='str',
|
|
|
|
dest='sponsorblock_remove', default=set(), action='callback', type='str',
|
|
|
|
callback=_set_from_options_callback, callback_kwargs={'allowed_values': SponsorBlockPP.CATEGORIES.keys()},
|
|
|
|
callback=_set_from_options_callback, callback_kwargs={
|
|
|
|
help=(
|
|
|
|
'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. '
|
|
|
|
'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. '
|
|
|
|
'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.add_option(
|
|
|
|
'--sponsorblock-chapter-title', metavar='TEMPLATE',
|
|
|
|
'--sponsorblock-chapter-title', metavar='TEMPLATE',
|
|
|
|
default=DEFAULT_SPONSORBLOCK_CHAPTER_TITLE, dest='sponsorblock_chapter_title',
|
|
|
|
default=DEFAULT_SPONSORBLOCK_CHAPTER_TITLE, dest='sponsorblock_chapter_title',
|
|
|
|