[BUGFIX] break_on_existing for tv presets, break_on_reject only when after is supplied (#273)

This commit is contained in:
Jesse Bannon 2022-10-06 12:21:37 -07:00 committed by GitHub
parent 5b8ee7f2de
commit ed7015296c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -62,6 +62,11 @@ class DateRangePlugin(Plugin[DateRangeOptions]):
overrides=self.overrides,
)
if source_date_range:
ytdl_options_builder.add({"daterange": source_date_range, "break_on_reject": True})
ytdl_options_builder.add({"daterange": source_date_range})
# Only add break_on_reject if after is specified, but not before.
# Otherwise, it can break on first metadata pull if it's after the 'before'
if self.plugin_options.after and not self.plugin_options.before:
ytdl_options_builder.add({"break_on_reject": True})
return ytdl_options_builder.to_dict()

View file

@ -9,6 +9,9 @@ presets:
thumbnail_name: "{episode_file_path}-thumb.jpg"
maintain_download_archive: True
ytdl_options:
break_on_existing: True
chapters:
embed_chapters: True