Add MOVIES_DIR to conf; remove hardcoded 'movies' subdir

All scripts now use $MOVIES_DIR instead of $BASE_DIR/movies.
Defaults to BASE_DIR/movies but can point to a separate drive.

https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
Claude
2026-04-19 16:01:27 +00:00
parent 46b3a36d0a
commit fffb19fd38
7 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ fi
echo "Images found: $total_images"
# ── Prepare output directory ──────────────────────────────────────────────────
output_dir="$base_dir/movies/$CAM_NAME/$ASTRO_YEAR/$SEASON/Mvt$MVT_NUM"
output_dir="$MOVIES_DIR/$CAM_NAME/$ASTRO_YEAR/$SEASON/Mvt$MVT_NUM"
mkdir -p "$output_dir"
# ── Build sorted image list ───────────────────────────────────────────────────
+1 -1
View File
@@ -11,7 +11,7 @@ output_date=$(date +%Y-%m)
image_dir="$BASE_DIR/$CAM_NAME/$current_date"
# Set output directory
output_dir="$BASE_DIR/movies/$CAM_NAME/$output_date/sunrise-only"
output_dir="$MOVIES_DIR/$CAM_NAME/$output_date/sunrise-only"
# Make sure the output directory exists
mkdir -p "$output_dir"
+1 -1
View File
@@ -20,7 +20,7 @@ base_dir="$BASE_DIR"
# ── Date / paths ──────────────────────────────────────────────────────────────
yesterday=$(date --date="yesterday" +%Y-%m-%d)
image_dir="$base_dir/$CAM_NAME/$yesterday"
output_dir="$base_dir/movies/$CAM_NAME/fullday"
output_dir="$MOVIES_DIR/$CAM_NAME/fullday"
mkdir -p "$output_dir"
# ── Purge old full-day videos ─────────────────────────────────────────────────
+1 -1
View File
@@ -43,7 +43,7 @@ eval "$(python3 "$SCRIPT_DIR/season_info.py" ${DATE_ARG:+"$DATE_ARG"})"
echo "Season=$SEASON Mvt=$MVT_NUM Year=$ASTRO_YEAR (ref: ${DATE_ARG:-today})"
# ── Locate files ──────────────────────────────────────────────────────────────
video_dir="$base_dir/movies/$CAM_NAME/$ASTRO_YEAR/$SEASON/Mvt$MVT_NUM"
video_dir="$MOVIES_DIR/$CAM_NAME/$ASTRO_YEAR/$SEASON/Mvt$MVT_NUM"
output_dir="$video_dir/montage"
mkdir -p "$output_dir"
+1
View File
@@ -152,6 +152,7 @@ SCRIPT_DIR=/home/motion/drives/local-2tb/sunrise-scripts
# ── Storage ───────────────────────────────────────────────────────────────────
BASE_DIR=/home/motion/drives/local-2tb
MOVIES_DIR=$BASE_DIR/movies # override if videos live on a different drive
MUSIC_DIR=/home/motion/drives/local-2tb/music/4 Seasons
# ── Location & timezone ───────────────────────────────────────────────────────
+1 -1
View File
@@ -45,7 +45,7 @@ today_date_str = today.strftime("%Y-%m-%d") # e.g., "2024-11-05"
today_month_str = today.strftime("%Y-%m") # e.g., "2024-11"
# Set the full folder path for today's video
base_video_folder = os.path.join(config.get('BASE_DIR', ''), 'movies', config.get('CAM_NAME', 'sunrise'))
base_video_folder = os.path.join(config.get('MOVIES_DIR', ''), config.get('CAM_NAME', 'sunrise'))
output_dir = os.path.join(base_video_folder, today_month_str, "sunrise-only")
# Check if the directory exists
+2 -2
View File
@@ -8,7 +8,7 @@
# The 12 individual movement videos already carry their own attribution overlay
# (first 6 seconds of each), so no extra card is appended here.
#
# Output: $BASE_DIR/movies/$CAM_NAME/$ASTRO_YEAR/$CAM_NAME-$ASTRO_YEAR.mp4
# Output: $MOVIES_DIR/$CAM_NAME/$ASTRO_YEAR/$CAM_NAME-$ASTRO_YEAR.mp4
set -euo pipefail
@@ -23,7 +23,7 @@ fi
# Camera name: second argument overrides conf (passed through from montage-mvt.sh).
CAM_NAME="${2:-$CAM_NAME}"
year_dir="$BASE_DIR/movies/$CAM_NAME/$ASTRO_YEAR"
year_dir="$MOVIES_DIR/$CAM_NAME/$ASTRO_YEAR"
echo "Assembling Four Seasons $ASTRO_YEAR from $year_dir ..."