docs
This commit is contained in:
parent
43ceea9b54
commit
9c1e72a506
5 changed files with 23 additions and 5 deletions
|
|
@ -640,6 +640,8 @@ Defines where to output files and thumbnails after all post-processing has compl
|
|||
maintain_download_archive: True
|
||||
keep_files_before: now
|
||||
keep_files_after: 19000101
|
||||
keep_max_files: 1000
|
||||
keep_files_date_eval: "{upload_date_standardized}"
|
||||
|
||||
``download_archive_name``
|
||||
|
||||
|
|
@ -690,6 +692,16 @@ Defines where to output files and thumbnails after all post-processing has compl
|
|||
``keep_max_files``.
|
||||
|
||||
|
||||
``keep_files_date_eval``
|
||||
|
||||
:expected type: str
|
||||
:description:
|
||||
Uses this standardized date in the form of YYYY-MM-DD to record in the
|
||||
download archive for a given entry. Subsequently, uses this value to
|
||||
perform evaluation for keep_files_before/after and keep_max_files. Defaults
|
||||
to the entry's upload_date_standardized variable.
|
||||
|
||||
|
||||
``keep_max_files``
|
||||
|
||||
:expected type: Optional[OverridesFormatter]
|
||||
|
|
|
|||
|
|
@ -659,3 +659,9 @@ ytdl_sub_input_url_index
|
|||
:type: ``Integer``
|
||||
:description:
|
||||
The index of the input URL as defined in the subscription, top-most being the 0th index.
|
||||
|
||||
ytdl_sub_keep_files_date_eval
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
:type: ``String``
|
||||
:description:
|
||||
The standardized date variable supplied in ``output_options.keep_files_date_eval``.
|
||||
|
|
|
|||
|
|
@ -824,10 +824,10 @@ class YtdlSubVariableDefinitions(ABC):
|
|||
)
|
||||
|
||||
@cached_property
|
||||
def ytdl_sub_entry_date_eval(self: "VariableDefinitions") -> StringVariable:
|
||||
def ytdl_sub_keep_files_date_eval(self: "VariableDefinitions") -> StringVariable:
|
||||
"""
|
||||
:description:
|
||||
The standardized date variable supplied in ``output_options.entry_date_eval``
|
||||
The standardized date variable supplied in ``output_options.keep_files_date_eval``.
|
||||
"""
|
||||
return StringVariable(
|
||||
variable_name="ytdl_sub_entry_date_eval",
|
||||
|
|
@ -1132,7 +1132,7 @@ class VariableDefinitions(
|
|||
self.ytdl_sub_input_url,
|
||||
self.ytdl_sub_input_url_index,
|
||||
self.ytdl_sub_input_url_count,
|
||||
self.ytdl_sub_entry_date_eval,
|
||||
self.ytdl_sub_keep_files_date_eval,
|
||||
}
|
||||
|
||||
@cache
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ class SubscriptionDownload(BaseSubscription, ABC):
|
|||
# Inject OutputOption variables here
|
||||
entry.add(
|
||||
{
|
||||
VARIABLES.ytdl_sub_entry_date_eval: (
|
||||
VARIABLES.ytdl_sub_keep_files_date_eval: (
|
||||
self.output_options.keep_files_date_eval.format_string
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class DownloadMapping:
|
|||
DownloadMapping for the entry
|
||||
"""
|
||||
return DownloadMapping(
|
||||
upload_date=entry.get(v.ytdl_sub_entry_date_eval, str),
|
||||
upload_date=entry.get(v.ytdl_sub_keep_files_date_eval, str),
|
||||
extractor=entry.download_archive_extractor,
|
||||
file_names=set(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue