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:
Claude
2026-04-19 00:19:59 +00:00
parent be5735867e
commit d20a0d94ae
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -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}")