Initial commit: self-hosted personal radio station

Flask + React web UI with audio player, podcast queue, feed management,
episode browser, music library, schedule viewer, and log tail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 19:01:33 -07:00
co-authored by Claude Opus 4.6
commit 3d635b742c
53 changed files with 7023 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
"""SQLite database helpers for the web UI."""
import sqlite3
from flask import g
from .config import DB_PATH
def get_db() -> sqlite3.Connection:
if "db" not in g:
g.db = sqlite3.connect(str(DB_PATH), timeout=5)
g.db.row_factory = sqlite3.Row
g.db.execute("PRAGMA journal_mode=WAL")
g.db.execute("PRAGMA foreign_keys=ON")
g.db.execute("PRAGMA busy_timeout=5000")
return g.db
def close_db(e=None):
db = g.pop("db", None)
if db is not None:
db.close()