Skip to content

Commit

Permalink
Fixed append to only append after file added to completed list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knucklessg1 committed Apr 27, 2024
1 parent dc92c5a commit 3d3bd9a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions media_manager/media_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,7 @@ def set_video_metadata(self) -> None:
if not failure:
os.remove(self.new_media_file_path)
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 @@ -672,11 +670,12 @@ def set_video_metadata(self) -> None:
if not failure:
os.remove(self.new_media_file_path)
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
return
self.completed_media_files.append(self.media_files[current_index])
self.find_media()
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 3d3bd9a

Please sign in to comment.