From 170ae6eed0f88109da86a10a4306778d0a4919f0 Mon Sep 17 00:00:00 2001 From: Daniel Messer Date: Fri, 30 Oct 2026 16:11:22 -0500 Subject: [PATCH] Add optional episode titles to queued and live broadcasts Store an episode_title on each broadcast, settable from the dashboard or with set_show.php --title=, and show it under the show name on index.php and under the heading on live.php. Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 8 ++++---- SETUP.md | 1 + admin/index.php | 22 ++++++++++++++-------- assets/css/main.css | 4 ++++ cli/set_show.php | 28 +++++++++++++++++++++------- includes/broadcasts.php | 15 +++++++++------ index.php | 3 +++ live.php | 8 ++++++++ sql/schema.sql | 3 +++ 9 files changed, 67 insertions(+), 25 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a4f6e81..85e25ea 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,7 +27,7 @@ Public pages: Admin backend ([admin/](admin/)): - [admin/login.php](admin/login.php), [admin/logout.php](admin/logout.php) — Username/password login. -- [admin/index.php](admin/index.php) — Dashboard: broadcast status, queue the next show (with an optional date and Eastern start time), switch the live show, clear the queue. +- [admin/index.php](admin/index.php) — Dashboard: broadcast status, queue the next show (with an optional episode title, date and Eastern start time), switch the live show or its episode title, clear the queue. - [admin/shows.php](admin/shows.php), [admin/show_edit.php](admin/show_edit.php) — List, add, edit and delete shows, including the description and icon and background image uploads. Shared includes: @@ -39,7 +39,7 @@ Shared includes: Command-line tools (run over SSH from the site root): - [cli/poll_icecast.php](cli/poll_icecast.php) — Cron-run poller that records broadcasts and tracks. -- [cli/set_show.php](cli/set_show.php) — Lists shows, or queues/sets the show by slug, optionally with a start time (`php cli/set_show.php 2026-10-30 19:30`). Same behaviour as the dashboard control. +- [cli/set_show.php](cli/set_show.php) — Lists shows, or queues/sets the show by slug, optionally with a start time and episode title (`php cli/set_show.php 2026-10-30 19:30 --title="Ethereal and Enya"`). Same behaviour as the dashboard control. - [cli/create_admin.php](cli/create_admin.php) — Creates an admin account or resets its password. Other: @@ -60,7 +60,7 @@ Other: MariaDB on localhost. Credentials live in `config/db_credentials.php`, which is gitignored and uploaded to the server separately. Tables (see [sql/schema.sql](sql/schema.sql)): - `shows` — the shows, with a unique `slug`, a plain-text `description` (blank lines separate paragraphs) and optional `icon_image` and `background_image` (filenames in `images/backgrounds/`). -- `broadcasts` — one row per streaming session: pending (`started_at` NULL, queued from the dashboard or `cli/set_show.php`), live (`ended_at` NULL), or ended. `scheduled_at` is the advertised start time shown on `index.php`; the broadcast still starts whenever the stream comes online. +- `broadcasts` — one row per streaming session: pending (`started_at` NULL, queued from the dashboard or `cli/set_show.php`), live (`ended_at` NULL), or ended. `scheduled_at` is the advertised start time shown on `index.php`; the broadcast still starts whenever the stream comes online. `episode_title` is an optional per-episode title (e.g. "Ethereal and Enya") shown under the show name on `index.php` and under the heading on `live.php`. - `played_tracks` — tracks per broadcast. Cleared ten minutes after the broadcast ends; no long-term history is kept. - `admins` — admin accounts (username + password hash). - `login_attempts` — failed logins by IP, used for throttling. @@ -128,7 +128,7 @@ Server-only setup (one-time, or when the schema changes): ## Updating Show Information -The `index.php` sidebar is driven by the database. Before a show, queue it on the admin dashboard (or `php cli/set_show.php