1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 16:45:17 +00:00

[SponsorBlock] Support chapter category (#5260)

Authored by: ajayyy, pukkandan
This commit is contained in:
Ajay Ramachandran
2022-10-18 12:51:57 -04:00
committed by GitHub
parent 814bba3933
commit 63c547d71c
5 changed files with 46 additions and 24 deletions

View File

@ -1737,7 +1737,7 @@ def create_parser():
'--sponsorblock-remove', metavar='CATS',
dest='sponsorblock_remove', default=set(), action='callback', type='str',
callback=_set_from_options_callback, callback_kwargs={
'allowed_values': set(SponsorBlockPP.CATEGORIES.keys()) - set(SponsorBlockPP.POI_CATEGORIES.keys()),
'allowed_values': set(SponsorBlockPP.CATEGORIES.keys()) - set(SponsorBlockPP.NON_SKIPPABLE_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.
@ -1747,7 +1747,7 @@ def create_parser():
'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 '
'except that "default" refers to "all,-filler" '
f'and {", ".join(SponsorBlockPP.POI_CATEGORIES.keys())} is not available'))
f'and {", ".join(SponsorBlockPP.NON_SKIPPABLE_CATEGORIES.keys())} are not available'))
sponsorblock.add_option(
'--sponsorblock-chapter-title', metavar='TEMPLATE',
default=DEFAULT_SPONSORBLOCK_CHAPTER_TITLE, dest='sponsorblock_chapter_title',