eliminacion-localhost

This commit is contained in:
2026-03-05 23:13:15 +01:00
parent 8d8cc97bef
commit 0b8fe7bbec
3 changed files with 104 additions and 36 deletions

View File

@@ -874,11 +874,13 @@
// ── Init ─────────────────────────────────────────────────────────────────────
async function init() {
try {
const res = await fetch('/api/channels');
const res = await fetch('channels.json');
const data = await res.json();
App.channels = data.channels;
App.groups = data.groups;
App.groupMeta = data.group_meta || {};
App.groups = (data.groups || []).map(g => typeof g === 'string' ? g : g.name).sort();
App.groupMeta = Object.fromEntries(
(data.groups || []).filter(g => typeof g !== 'string').map(g => [g.name, g.logo || ''])
);
$('sourceLabel').textContent = data.source || '';
renderAll();
} catch (err) {