Add BunnyCDN integration, on-air website badge, publish script fixes

- On-air toggle uploads status.json to BunnyCDN + purges cache, website
  polls it every 15s to show live ON AIR / OFF AIR badge
- Publish script downloads Castopod's copy of audio for CDN upload
  (byte-exact match), removes broken slug fallback, syncs all episode
  media to CDN after publishing
- Fix f-string syntax error in publish_episode.py (Python <3.12)
- Enable CORS on BunnyCDN pull zone for json files
- CDN URLs for website OG images, stem recorder bug fixes, LLM token
  budget tweaks, session context in CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 17:34:18 -07:00
parent 7d88c76f90
commit 7b7f9b8208
11 changed files with 454 additions and 61 deletions

View File

@@ -300,6 +300,24 @@ function initTestimonials() {
resetAutoplay();
}
// On-Air Status
function checkOnAir() {
fetch(`https://cdn.lukeattheroost.com/status.json?_=${Date.now()}`)
.then(r => r.json())
.then(data => {
const badge = document.getElementById('on-air-badge');
const offBadge = document.getElementById('off-air-badge');
const phone = document.getElementById('phone-section');
const live = !!data.on_air;
if (badge) badge.classList.toggle('visible', live);
if (offBadge) offBadge.classList.toggle('hidden', live);
if (phone) phone.classList.toggle('live', live);
})
.catch(() => {});
}
// Init
fetchEpisodes();
initTestimonials();
checkOnAir();
setInterval(checkOnAir, 15000);