This commit was merged in pull request #392.
This commit is contained in:
17
app.js
17
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');
|
||||
|
||||
Reference in New Issue
Block a user