Skip to content

Commit

Permalink
Bugfix for b4e0d75
Browse files Browse the repository at this point in the history
  • Loading branch information
pukkandan committed Jun 22, 2023
1 parent 89bed01 commit e59e207
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yt_dlp/utils/_utils.py
Expand Up @@ -3758,8 +3758,6 @@ def __init__(self, chapters, ranges, from_info=False):
self.chapters, self.ranges, self.from_info = chapters, ranges, from_info

def __call__(self, info_dict, ydl):
if not any((self.ranges, self.chapters, self.from_info)):
yield {}

warning = ('There are no chapters matching the regex' if info_dict.get('chapters')
else 'Cannot match chapters since chapter information is unavailable')
Expand All @@ -3779,9 +3777,11 @@ def __call__(self, info_dict, ydl):

if self.from_info and (info_dict.get('start_time') or info_dict.get('end_time')):
yield {
'start_time': info_dict.get('start_time'),
'end_time': info_dict.get('end_time'),
'start_time': info_dict.get('start_time') or 0,
'end_time': info_dict.get('end_time') or float('inf'),
}
elif not self.ranges and not self.chapters:
yield {}

@staticmethod
def _handle_negative_timestamp(time, info):
Expand Down

0 comments on commit e59e207

Please sign in to comment.