Skip to content

Commit

Permalink
Only append when a file is changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knucklessg1 committed Apr 27, 2024
1 parent cb00c89 commit b5b669b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion media_manager/media_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ def set_video_metadata(self) -> None:
os.rename(self.temporary_media_file_path, self.new_media_file_path)
self.find_media()
self.media_file_index = 0
self.completed_media_files.append(self.media_files[current_index])
elif ((current_title_metadata != self.new_file_name or (self.optimize and video_codec != "hevc"))
and self.subtitle is True):
subtitle_file = "English.srt"
Expand Down Expand Up @@ -673,9 +674,9 @@ def set_video_metadata(self) -> None:
os.rename(self.temporary_media_file_path, self.new_media_file_path)
self.find_media()
self.media_file_index = 0
self.completed_media_files.append(self.media_files[current_index])
else:
self.media_file_index += 1
self.completed_media_files.append(self.media_files[current_index])
logging.debug(f"Completed File: {self.completed_media_files[len(self.completed_media_files) - 1]}\n"
f"All Completed Files: {self.completed_media_files}")
logging.debug(f"\tMetadata Updated: {os.path.basename(self.new_media_file_path)}")
Expand Down

0 comments on commit b5b669b

Please sign in to comment.