This commit is contained in:
pukkandan 2023-06-22 23:22:14 +05:30
parent 89bed01374
commit e59e20744e
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39

View file

@ -3758,8 +3758,6 @@ class download_range_func:
self.chapters, self.ranges, self.from_info = chapters, ranges, from_info self.chapters, self.ranges, self.from_info = chapters, ranges, from_info
def __call__(self, info_dict, ydl): 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') warning = ('There are no chapters matching the regex' if info_dict.get('chapters')
else 'Cannot match chapters since chapter information is unavailable') else 'Cannot match chapters since chapter information is unavailable')
@ -3779,9 +3777,11 @@ class download_range_func:
if self.from_info and (info_dict.get('start_time') or info_dict.get('end_time')): if self.from_info and (info_dict.get('start_time') or info_dict.get('end_time')):
yield { yield {
'start_time': info_dict.get('start_time'), 'start_time': info_dict.get('start_time') or 0,
'end_time': info_dict.get('end_time'), 'end_time': info_dict.get('end_time') or float('inf'),
} }
elif not self.ranges and not self.chapters:
yield {}
@staticmethod @staticmethod
def _handle_negative_timestamp(time, info): def _handle_negative_timestamp(time, info):