diff --git a/app.js b/app.js index 3c1d63e..61a2f03 100644 --- a/app.js +++ b/app.js @@ -3731,6 +3731,23 @@ async function initBookshelves() { const errorEl = document.getElementById('podcast-error'); errorEl.style.display = 'none'; errorEl.textContent = ''; + errorEl.style.opacity = '1'; + setTimeout(() => { + errorEl.style.opacity = '0'; + setTimeout(() => errorEl.style.display = 'none', 300); + }, 3000); + + try { + const response = await fetch('SOUL.md'); + if (!response.ok) throw new Error('Failed to load SOUL.md'); + const text = await response.text(); + const lines = text.split('\n').filter(line => line.trim() !== ''); + speakLines(lines); + } catch (err) { + errorEl.textContent = 'Failed to load SOUL.md. Check console for details.'; + errorEl.style.display = 'block'; + console.error('Podcast error:', err); + } try { const response = await fetch('SOUL.md');