A feature-rich command-line audio/video downloader
[Sponsorblock] Don't crash when duration is unknown
pukkandanb0f636beb464
diff --git a/yt_dlp/postprocessor/sponsorblock.py b/yt_dlp/postprocessor/sponsorblock.pyindex 7749ffe054..7f75561dbd 100644--- a/yt_dlp/postprocessor/sponsorblock.py+++ b/yt_dlp/postprocessor/sponsorblock.py@@ -38,7 +38,7 @@ class SponsorBlockPP(FFmpegPostProcessor):return [], infoself.to_screen('Fetching SponsorBlock segments')- info['sponsorblock_chapters'] = self._get_sponsor_chapters(info, info['duration'])+ info['sponsorblock_chapters'] = self._get_sponsor_chapters(info, info.get('duration'))return [], infodef _get_sponsor_chapters(self, info, duration):