From b0f636beb46411d454e4f14ae5372d672c798701 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sat, 23 Apr 2022 22:15:00 +0530 Subject: [PATCH] [Sponsorblock] Don't crash when duration is unknown CLoses #3529 --- yt_dlp/postprocessor/sponsorblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/postprocessor/sponsorblock.py b/yt_dlp/postprocessor/sponsorblock.py index 7749ffe05..7f75561db 100644 --- a/yt_dlp/postprocessor/sponsorblock.py +++ b/yt_dlp/postprocessor/sponsorblock.py @@ -38,7 +38,7 @@ class SponsorBlockPP(FFmpegPostProcessor): return [], info self.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 [], info def _get_sponsor_chapters(self, info, duration):