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:
@@ -0,0 +1,23 @@
|
||||
"""Configuration for the Local Radio web UI."""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# In dev mode, auto-detect base dir from project structure
|
||||
_default_base = "/opt/localradio"
|
||||
_project_root = Path(__file__).resolve().parent.parent
|
||||
if (_project_root / "config" / "station.yaml").exists():
|
||||
_default_base = str(_project_root)
|
||||
|
||||
BASE_DIR = Path(os.environ.get("LOCALRADIO_BASE", _default_base))
|
||||
|
||||
DB_PATH = BASE_DIR / "state" / "radio.db"
|
||||
QUEUE_DIR = BASE_DIR / "state" / "queue"
|
||||
FEEDS_CONFIG = BASE_DIR / "config" / "feeds.yaml"
|
||||
STATION_CONFIG = BASE_DIR / "config" / "station.yaml"
|
||||
MUSIC_BASE = BASE_DIR / "media" / "music"
|
||||
FALLBACK_DIR = BASE_DIR / "media" / "fallback"
|
||||
PODCAST_DIR = BASE_DIR / "media" / "podcasts"
|
||||
LOG_DIR = BASE_DIR / "logs"
|
||||
|
||||
STATIC_DIR = Path(__file__).parent / "frontend" / "dist"
|
||||
Reference in New Issue
Block a user