aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2023-06-22 23:22:14 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2023-06-22 23:45:53 +0530
commite59e20744eb32ce4b6ea0dece7c673be8376a710 (patch)
tree969fd236a9ec639a34b66c82da23426aa4e872c4
parent89bed013741a776506f60380b7fd89d27d0710b4 (diff)
downloadhypervideo-pre-e59e20744eb32ce4b6ea0dece7c673be8376a710.tar.lz
hypervideo-pre-e59e20744eb32ce4b6ea0dece7c673be8376a710.tar.xz
hypervideo-pre-e59e20744eb32ce4b6ea0dece7c673be8376a710.zip
Bugfix for b4e0d75848e9447cee2cd3646ce54d4744a7ff56
-rw-r--r--yt_dlp/utils/_utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py
index 10052009f..de51f6208 100644
--- a/yt_dlp/utils/_utils.py
+++ b/yt_dlp/utils/_utils.py
@@ -3758,8 +3758,6 @@ class download_range_func:
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')
@@ -3779,9 +3777,11 @@ class download_range_func:
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):