#!/bin/bash
# update_now_playing.sh — Refresh the live "Now Playing" banner (cron: */5 * * * *)
#
# Regenerates the live banner image showing the currently playing video title.
# Writes output to logs/banner-update.log.

BASE_DIR="/var/www/html/media"
LOG="$BASE_DIR/logs/banner-update.log"
DATE=$(date -u '+%Y-%m-%d')

python3 "$BASE_DIR/scripts/gen_banners.py" --live-only "$DATE" >> "$LOG" 2>&1
