do not write as modified if it was added
This commit is contained in:
parent
df15e0791c
commit
287eb8ac81
5 changed files with 11 additions and 20 deletions
|
|
@ -348,15 +348,18 @@ class FileHandler:
|
||||||
source_file_path = Path(self.working_directory) / file_name
|
source_file_path = Path(self.working_directory) / file_name
|
||||||
output_file_path = Path(self.output_directory) / output_file_name
|
output_file_path = Path(self.output_directory) / output_file_name
|
||||||
|
|
||||||
# output file exists, see if we modify it
|
# output file exists, and it's not marked as created already, see if we modify it
|
||||||
if os.path.isfile(output_file_path):
|
if (
|
||||||
|
os.path.isfile(output_file_path)
|
||||||
|
and output_file_name not in self.file_handler_transaction_log.files_created
|
||||||
|
):
|
||||||
if not files_equal(source_file_path, output_file_path):
|
if not files_equal(source_file_path, output_file_path):
|
||||||
self._file_handler_transaction_log.log_modified_file(
|
self.file_handler_transaction_log.log_modified_file(
|
||||||
file_name=output_file_name, file_metadata=file_metadata
|
file_name=output_file_name, file_metadata=file_metadata
|
||||||
)
|
)
|
||||||
# output file does not already exist, creates a new file
|
# output file does not already exist, creates a new file
|
||||||
else:
|
else:
|
||||||
self._file_handler_transaction_log.log_created_file(
|
self.file_handler_transaction_log.log_created_file(
|
||||||
file_name=output_file_name, file_metadata=file_metadata
|
file_name=output_file_name, file_metadata=file_metadata
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,3 @@ tvshow.nfo
|
||||||
tvshow:
|
tvshow:
|
||||||
plot: Plugin and map updates for the server Project Zombie.
|
plot: Plugin and map updates for the server Project Zombie.
|
||||||
title: Project / Zombie
|
title: Project / Zombie
|
||||||
Files modified in '{output_directory}'
|
|
||||||
----------------------------------------
|
|
||||||
.ytdl-sub-recent-download-archive.json
|
|
||||||
|
|
@ -134,6 +134,3 @@ j_b/[2022] Acoustic Treats/11 - Untold History.mp3
|
||||||
track: 11
|
track: 11
|
||||||
year: 2022
|
year: 2022
|
||||||
j_b/[2022] Acoustic Treats/folder.jpg
|
j_b/[2022] Acoustic Treats/folder.jpg
|
||||||
Files modified in '{output_directory}'
|
|
||||||
----------------------------------------
|
|
||||||
.ytdl-sub-jb-download-archive.json
|
|
||||||
|
|
@ -286,6 +286,3 @@ tvshow.nfo
|
||||||
plot: Plugin and map updates for the server Project Zombie.
|
plot: Plugin and map updates for the server Project Zombie.
|
||||||
source_uploader: Project Zombie
|
source_uploader: Project Zombie
|
||||||
title: Project / Zombie
|
title: Project / Zombie
|
||||||
Files modified in '{output_directory}'
|
|
||||||
----------------------------------------
|
|
||||||
.ytdl-sub-pz-download-archive.json
|
|
||||||
|
|
@ -37,6 +37,3 @@ tvshow.nfo
|
||||||
source_description: Trailers, Updates, etc
|
source_description: Trailers, Updates, etc
|
||||||
source_title: Jesse's Minecraft Server
|
source_title: Jesse's Minecraft Server
|
||||||
source_uploader: Project Zombie
|
source_uploader: Project Zombie
|
||||||
Files modified in '{output_directory}'
|
|
||||||
----------------------------------------
|
|
||||||
.ytdl-sub-music_video_playlist_test-download-archive.json
|
|
||||||
Loading…
Reference in a new issue