[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 @@ class SponsorBlockPP(FFmpegPostProcessor):
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):