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
|
||||
output_file_path = Path(self.output_directory) / output_file_name
|
||||
|
||||
# output file exists, see if we modify it
|
||||
if os.path.isfile(output_file_path):
|
||||
# output file exists, and it's not marked as created already, see if we modify it
|
||||
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):
|
||||
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
|
||||
)
|
||||
# output file does not already exist, creates a new file
|
||||
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
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,4 @@ tvshow.nfo
|
|||
NFO tags:
|
||||
tvshow:
|
||||
plot: Plugin and map updates for the server Project Zombie.
|
||||
title: Project / Zombie
|
||||
Files modified in '{output_directory}'
|
||||
----------------------------------------
|
||||
.ytdl-sub-recent-download-archive.json
|
||||
title: Project / Zombie
|
||||
|
|
@ -133,7 +133,4 @@ j_b/[2022] Acoustic Treats/11 - Untold History.mp3
|
|||
title: Untold History
|
||||
track: 11
|
||||
year: 2022
|
||||
j_b/[2022] Acoustic Treats/folder.jpg
|
||||
Files modified in '{output_directory}'
|
||||
----------------------------------------
|
||||
.ytdl-sub-jb-download-archive.json
|
||||
j_b/[2022] Acoustic Treats/folder.jpg
|
||||
|
|
@ -285,7 +285,4 @@ tvshow.nfo
|
|||
tvshow:
|
||||
plot: Plugin and map updates for the server Project Zombie.
|
||||
source_uploader: Project Zombie
|
||||
title: Project / Zombie
|
||||
Files modified in '{output_directory}'
|
||||
----------------------------------------
|
||||
.ytdl-sub-pz-download-archive.json
|
||||
title: Project / Zombie
|
||||
|
|
@ -36,7 +36,4 @@ tvshow.nfo
|
|||
test:
|
||||
source_description: Trailers, Updates, etc
|
||||
source_title: Jesse's Minecraft Server
|
||||
source_uploader: Project Zombie
|
||||
Files modified in '{output_directory}'
|
||||
----------------------------------------
|
||||
.ytdl-sub-music_video_playlist_test-download-archive.json
|
||||
source_uploader: Project Zombie
|
||||
Loading…
Reference in a new issue