Skip to content

Commit

Permalink
Optimize not to find media when skipping.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knucklessg1 committed Apr 27, 2024
1 parent 3ec1439 commit f269df3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions media_manager/media_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +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
elif ((current_title_metadata != self.new_file_name or (self.optimize and video_codec != "hevc"))
and self.subtitle is True):
Expand Down Expand Up @@ -670,13 +671,14 @@ 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
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)}")
self.find_media()
self.media_file_index = 0

# Rename directory
def rename_directory(self) -> None:
Expand Down

0 comments on commit f269df3

Please sign in to comment.