File tree Expand file tree Collapse file tree
src/ytdl_sub/subscriptions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,8 +155,8 @@ def _maintain_archive_file(self):
155155 keep_max_files : Optional [int ] = None
156156 if self .output_options .keep_max_files :
157157 # validated it can be cast to int within the validator
158- keep_max_files = int (
159- self .overrides . apply_formatter ( self . output_options .keep_max_files )
158+ keep_max_files = self . overrides . apply_formatter (
159+ self .output_options .keep_max_files , expected_type = int
160160 )
161161
162162 if date_range_to_keep or self .output_options .keep_max_files is not None :
Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ def _output_options(self) -> Dict:
9494 self ._enhanced_download_archive .working_ytdl_file_path
9595 )
9696 if self ._preset .output_options .keep_max_files :
97- keep_max_files = int (
98- self ._overrides . apply_formatter ( self . _preset .output_options .keep_max_files )
97+ keep_max_files = self . _overrides . apply_formatter (
98+ self ._preset .output_options .keep_max_files , expected_type = int
9999 )
100100 if keep_max_files > 0 :
101101 # yt-dlp has a weird bug with max_downloads=1, set to 2 for safe measure
You can’t perform that action at this time.
0 commit comments