From 61858c650d7b99ff825528ec9092b41a63ffb4be Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Wed, 28 Jan 2026 06:27:14 -0600 Subject: [PATCH] Update output path for converted files in `premiere_to_resolve.py` to ensure they are saved in the same directory as the input files. Remove redundant mapping update comment for clarity. --- premiere_to_resolve.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/premiere_to_resolve.py b/premiere_to_resolve.py index 7a92adf..2e751fc 100644 --- a/premiere_to_resolve.py +++ b/premiere_to_resolve.py @@ -340,10 +340,11 @@ def main(): for filename, mapping in mp4_files.items(): input_path = mapping['local_path'] - # Create output filename with .mov extension + # Create output filename with .mov extension in the same directory as input + input_dir = os.path.dirname(input_path) base_name = os.path.splitext(filename)[0] output_filename = f"{base_name}.mov" - output_path = os.path.join(current_dir, output_filename) + output_path = os.path.join(input_dir, output_filename) if convert_mp4_to_mov(input_path, output_path): # Update mapping to point to converted file @@ -353,11 +354,7 @@ def main(): if conversion_map: print(f"\nSuccessfully converted {len(conversion_map)} file(s)") - # Update file_mapping for converted files - for original_filename, new_filename in conversion_map.items(): - if original_filename in file_mapping: - new_path = os.path.join(current_dir, new_filename) - file_mapping[original_filename]['local_path'] = new_path + # Note: file_mapping already updated above, no need to update again else: print("No MP4 files found that need conversion.")