]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/postprocessor/sponsorblock.py
[Sponsorblock] Don't crash when duration is unknown
[yt-dlp.git] / yt_dlp / postprocessor / sponsorblock.py
index 7749ffe054527d1c02eb1d54cfa73d6a20f25c83..7f75561dbd106b0818cc803ec3f68eadc4ab0676 100644 (file)
@@ -38,7 +38,7 @@ def run(self, info):
             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):