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.

This commit is contained in:
Danilo Reyes
2026-01-28 06:27:14 -06:00
parent d2dec4d7a1
commit 61858c650d

View File

@@ -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.")