Add show management and going-live controls to admin
- admin/shows.php: list shows - admin/show_edit.php: add, edit and delete shows, with validated background image uploads saved under generated names - admin/index.php: queue the next show, switch the live show, or clear the queue - includes/broadcasts.php: setBroadcastShow() and clearQueuedShow(), shared by the dashboard and cli/set_show.php - includes/admin_layout.php: flash messages and Shows nav link Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
babb71660c
commit
6e61fc6bda
7 files changed
+297
-12
No files matched your search
+1
-5
@@ -33,12 +33,8 @@ if (!$show) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$live = liveBroadcast($db);
|
||||
if ($live !== null) {
|
||||
$db->prepare('UPDATE broadcasts SET show_id = ? WHERE id = ?')->execute([$show['id'], $live['id']]);
|
||||
if (setBroadcastShow($db, (int)$show['id']) === 'live') {
|
||||
echo "Live broadcast is now {$show['name']}.\n";
|
||||
} else {
|
||||
$db->exec('DELETE FROM broadcasts WHERE started_at IS NULL');
|
||||
$db->prepare('INSERT INTO broadcasts (show_id) VALUES (?)')->execute([$show['id']]);
|
||||
echo "{$show['name']} is queued for the next broadcast.\n";
|
||||
}
|
||||
Reference in new issue
Block a user