1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 16:24:48 -04:00

Don't download entire video when no matching --download-sections

This commit is contained in:
pukkandan
2022-09-26 03:03:52 +05:30
parent 46a5b335e7
commit 0500ee3d81
2 changed files with 7 additions and 7 deletions

View File

@@ -3793,6 +3793,9 @@ class download_range_func:
self.chapters, self.ranges = chapters, ranges
def __call__(self, info_dict, ydl):
if not self.ranges and not self.chapters:
yield {}
warning = ('There are no chapters matching the regex' if info_dict.get('chapters')
else 'Cannot match chapters since chapter information is unavailable')
for regex in self.chapters or []: