feat(live): add language-aware flexible channel search (#23)

Add backend language detection, flexible live channel search, iptv-org catalog caching, and protected built-in EPG source registration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
blomios
2026-10-06 11:42:06 +02:00
parent a6759b116d
commit 2a1c745a26
11 changed files with 314 additions and 19 deletions

View File

@ -93,6 +93,9 @@ router.put('/:id', async (req, res) => {
}
const { name, url, username, password } = req.body;
if (existing.builtinKey) {
return res.status(409).json({ error: 'Built-in sources can only be enabled or disabled', code: 'BUILTIN_SOURCE_READONLY' });
}
const updated = await sources.update(req.params.id, {
name: name || existing.name,
url: url || existing.url,
@ -116,6 +119,9 @@ router.delete('/:id', async (req, res) => {
if (!existing) {
return res.status(404).json({ error: 'Source not found' });
}
if (existing.builtinKey) {
return res.status(409).json({ error: 'Built-in sources cannot be removed', code: 'BUILTIN_SOURCE_PROTECTED' });
}
// Cascade delete: Clean up SQLite data for this source
const db = getDb();