From 9c1a47eb3708928764cba5feb909fa868f62c88f Mon Sep 17 00:00:00 2001 From: Daniel Messer Date: Fri, 30 Oct 2026 16:28:21 -0500 Subject: [PATCH] Show the live show and episode in live.php social cards While a show is live, the og and twitter descriptions read " - " and the image is the show's icon (with the square summary card). Otherwise the station defaults are kept. Co-Authored-By: Claude Opus 5.5 --- live.php | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/live.php b/live.php index ef8f576..46b7270 100644 --- a/live.php +++ b/live.php @@ -13,6 +13,20 @@ $background = ''; if ($show && $show['background_image'] && is_file(__DIR__ . '/images/backgrounds/' . basename($show['background_image']))) { $background = 'images/backgrounds/' . rawurlencode(basename($show['background_image'])); } + +// Social cards describe the show while it's live, and fall back to the station defaults otherwise +$siteUrl = 'https://cyberpunklibrarian.nohost.me/rfe/'; +$socialDescription = 'Something different. Somewhere else.'; +$socialImage = $siteUrl . 'images/rfe-social.jpg'; +$socialCard = 'summary_large_image'; +if ($show && $show['started_at']) { + $socialDescription = $show['name'] . ($show['episode_title'] ? ' - ' . $show['episode_title'] : ''); + if ($show['icon_image'] && is_file(__DIR__ . '/images/backgrounds/' . basename($show['icon_image']))) { + $socialImage = $siteUrl . 'images/backgrounds/' . rawurlencode(basename($show['icon_image'])); + // Show icons are square, so use the small square card rather than the wide one + $socialCard = 'summary'; + } +} ?> - + - - + +