Fix sunrise output filename to reflect SUNRISE_TARGET_SECS from conf
The output video was always named -sunrise-10s.mp4 regardless of the configured duration. Both sunrise_video.10s.sh and sunrise2mm.py now derive the filename from SUNRISE_TARGET_SECS so changing it in conf produces correctly named files that the uploader still finds. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
+2
-2
@@ -53,8 +53,8 @@ if not os.path.isdir(output_dir):
|
||||
print(f"Error: The directory {output_dir} does not exist. The video may not have been created yet.")
|
||||
exit(1)
|
||||
|
||||
# Find the sunrise video file for today (e.g., 2024-11-05-sunrise-10s.mp4)
|
||||
final_video_file = os.path.join(output_dir, f"{today_date_str}-sunrise-10s.mp4")
|
||||
target_secs = config.get('SUNRISE_TARGET_SECS', '10')
|
||||
final_video_file = os.path.join(output_dir, f"{today_date_str}-sunrise-{target_secs}s.mp4")
|
||||
|
||||
# Debugging: print the full path of the video file to make sure it's correct
|
||||
print(f"Looking for video file: {final_video_file}")
|
||||
|
||||
Reference in New Issue
Block a user