aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-04-23 22:15:00 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-04-23 22:45:42 +0530
commitb0f636beb46411d454e4f14ae5372d672c798701 (patch)
tree5ced259411012648b40a980d90cd65d03ee58012
parentd14b920c330b00ca50a66bf471b9f901ebc16212 (diff)
downloadhypervideo-pre-b0f636beb46411d454e4f14ae5372d672c798701.tar.lz
hypervideo-pre-b0f636beb46411d454e4f14ae5372d672c798701.tar.xz
hypervideo-pre-b0f636beb46411d454e4f14ae5372d672c798701.zip
[Sponsorblock] Don't crash when duration is unknown
CLoses #3529
-rw-r--r--yt_dlp/postprocessor/sponsorblock.py2
1 files changed, 1 insertions, 1 deletions
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):