aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/modify_chapters.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/postprocessor/modify_chapters.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/postprocessor/modify_chapters.py')
-rw-r--r--yt_dlp/postprocessor/modify_chapters.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/postprocessor/modify_chapters.py b/yt_dlp/postprocessor/modify_chapters.py
index 0728bdcf5..91433c364 100644
--- a/yt_dlp/postprocessor/modify_chapters.py
+++ b/yt_dlp/postprocessor/modify_chapters.py
@@ -24,7 +24,7 @@ class ModifyChaptersPP(FFmpegPostProcessor):
*, sponsorblock_chapter_title=DEFAULT_SPONSORBLOCK_CHAPTER_TITLE, force_keyframes=False):
FFmpegPostProcessor.__init__(self, downloader)
self._remove_chapters_patterns = set(remove_chapters_patterns or [])
- self._remove_sponsor_segments = set(remove_sponsor_segments or [])
+ self._remove_sponsor_segments = set(remove_sponsor_segments or []) - set(SponsorBlockPP.POI_CATEGORIES.keys())
self._ranges_to_remove = set(remove_ranges or [])
self._sponsorblock_chapter_title = sponsorblock_chapter_title
self._force_keyframes = force_keyframes
@@ -302,7 +302,7 @@ class ModifyChaptersPP(FFmpegPostProcessor):
'name': SponsorBlockPP.CATEGORIES[category],
'category_names': [SponsorBlockPP.CATEGORIES[c] for c in cats]
})
- c['title'] = self._downloader.evaluate_outtmpl(self._sponsorblock_chapter_title, c)
+ c['title'] = self._downloader.evaluate_outtmpl(self._sponsorblock_chapter_title, c.copy())
# Merge identically named sponsors.
if (new_chapters and 'categories' in new_chapters[-1]
and new_chapters[-1]['title'] == c['title']):