[FEATURE] Set break_on_reject: True when using date_range plugin (#221)

This commit is contained in:
Jesse Bannon 2022-09-07 15:30:16 -07:00 committed by GitHub
parent 819bddc9d0
commit 4b2e6e1169
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ class DateRangePlugin(Plugin[DateRangeOptions]):
"""
Returns
-------
YTDL options for extracting audio
YTDL options for setting a date range
"""
ytdl_options_builder = YTDLOptionsBuilder()
@ -62,6 +62,6 @@ class DateRangePlugin(Plugin[DateRangeOptions]):
overrides=self.overrides,
)
if source_date_range:
ytdl_options_builder.add({"daterange": source_date_range})
ytdl_options_builder.add({"daterange": source_date_range, "break_on_reject": True})
return ytdl_options_builder.to_dict()