This commit is contained in:
Jesse Bannon 2023-03-20 23:44:20 -07:00
parent 7cdf209bcb
commit ac936d194e
3 changed files with 12 additions and 4 deletions

View file

@ -114,9 +114,7 @@ class InfoJsonDownloader(BaseDownloader[InfoJsonDownloaderOptions]):
entry.uid not in self._entry_mappings entry.uid not in self._entry_mappings
or file_name not in self._entry_mappings[entry.uid].file_names or file_name not in self._entry_mappings[entry.uid].file_names
): ):
self._enhanced_download_archive._file_handler.delete_file_from_output_directory( self._enhanced_download_archive.delete_file_from_output_directory(file_name)
file_name
)
def download(self, entry: Entry) -> Entry: def download(self, entry: Entry) -> Entry:
""" """

View file

@ -570,6 +570,17 @@ class EnhancedDownloadArchive:
self.save_file_to_output_directory(file_name=self._mapping_file_name) self.save_file_to_output_directory(file_name=self._mapping_file_name)
return self return self
def delete_file_from_output_directory(self, file_name: str):
"""
Deletes a file from the output directory
Parameters
----------
file_name
Name of the file, relative to the output directory
"""
return self._file_handler.delete_file_from_output_directory(file_name=file_name)
def save_file_to_output_directory( def save_file_to_output_directory(
self, self,
file_name: str, file_name: str,

View file

@ -170,7 +170,6 @@ class TestPrebuiltTVShowPresets:
transaction_log_summary_file_name=( transaction_log_summary_file_name=(
f"{expected_summary_name}_reformatted_to_{reformatted_tv_show_structure_preset}.txt" f"{expected_summary_name}_reformatted_to_{reformatted_tv_show_structure_preset}.txt"
), ),
regenerate_transaction_log=True,
) )
assert_expected_downloads( assert_expected_downloads(
output_directory=output_directory, output_directory=output_directory,