Skip to content

Commit ebf76da

Browse files
FEAT: Dynamically update progress bar description with current file name in Default Audio Track Switcher
1 parent ed79c5e commit ebf76da

File tree

1 file changed

+3
-1
lines changed
  • Default Audio Track Switcher

1 file changed

+3
-1
lines changed

Default Audio Track Switcher/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ def main():
454454
print(f"{BackgroundColors.YELLOW}No video files found in {INPUT_DIR}{Style.RESET_ALL}")
455455
return # Exit the program
456456

457-
for video in tqdm(videos, desc=f"{BackgroundColors.GREEN}Processing Video Files from {BackgroundColors.CYAN}{INPUT_DIR}{BackgroundColors.GREEN}...{Style.RESET_ALL}"): # For each video found, display a progress bar
457+
pbar = tqdm(videos, desc=f"{BackgroundColors.GREEN}Processing Video Files from {BackgroundColors.CYAN}{INPUT_DIR}{BackgroundColors.GREEN}...{Style.RESET_ALL}") # Initialize progress bar
458+
for video in pbar: # For each video found
459+
pbar.set_description(f"{BackgroundColors.GREEN}Processing: {BackgroundColors.CYAN}{os.path.basename(video)}{Style.RESET_ALL}") # Update description with current file name
458460
swap_audio_tracks(video) # Swap the audio tracks
459461

460462
print(f"\n{BackgroundColors.BOLD}{BackgroundColors.GREEN}All videos processed successfully.{Style.RESET_ALL}")

0 commit comments

Comments
 (0)