0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-22 02:15:12 +00:00

[Sponsorblock] Don't crash when duration is unknown

CLoses #3529
This commit is contained in:
pukkandan 2022-04-23 22:15:00 +05:30
parent d14b920c33
commit b0f636beb4
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -38,7 +38,7 @@ def run(self, info):
return [], info return [], info
self.to_screen('Fetching SponsorBlock segments') 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 return [], info
def _get_sponsor_chapters(self, info, duration): def _get_sponsor_chapters(self, info, duration):