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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user