aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-11-29 02:41:55 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-11-29 22:52:01 +0530
commitb222c27145a456eef4ed82a8dbbf92cb96fa8041 (patch)
treeaf4d70c9e733859d67ccd3cb4ad2a4892d76ac3d /yt_dlp/YoutubeDL.py
parent5e5be0c0b2060a238fa4d6ebf0f62d4004208e7b (diff)
downloadhypervideo-pre-b222c27145a456eef4ed82a8dbbf92cb96fa8041.tar.lz
hypervideo-pre-b222c27145a456eef4ed82a8dbbf92cb96fa8041.tar.xz
hypervideo-pre-b222c27145a456eef4ed82a8dbbf92cb96fa8041.zip
Option `--break-per-input` to apply --break-on... to each input URL
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index ea4c5ae2d..29c9ecd16 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -310,6 +310,8 @@ class YoutubeDL(object):
file that is in the archive.
break_on_reject: Stop the download process when encountering a video that
has been filtered out.
+ break_per_url: Whether break_on_reject and break_on_existing
+ should act on each input URL as opposed to for the entire queue
cookiefile: File name where cookies should be read from and dumped to
cookiesfrombrowser: A tuple containing the name of the browser and the profile
name/path from where cookies are loaded.
@@ -2968,9 +2970,13 @@ class YoutubeDL(object):
res = func(*args, **kwargs)
except UnavailableVideoError as e:
self.report_error(e)
- except DownloadCancelled as e:
+ except MaxDownloadsReached as e:
self.to_screen(f'[info] {e}')
raise
+ except DownloadCancelled as e:
+ self.to_screen(f'[info] {e}')
+ if not self.params.get('break_per_url'):
+ raise
else:
if self.params.get('dump_single_json', False):
self.post_extract(res)