Kodi was overkill for a phone-driven "play this video" box: a full media center (web server, CEC, library DB) whose surface area is exactly what wedged the Pi -- a video-decode session left Kodi stuck in an uninterruptible firmware-mailbox call after a kernel keyring Oops, dead until a power cycle. mpv is just a video player: hardware-decoded straight on KMS/DRM, no media-center baggage. It runs as its own --idle systemd service holding the playlist, so playback keeps going even if the app/phone/WiFi drop -- the same autonomy Kodi's native playlist gave us. The app talks to it over its JSON IPC Unix socket. PlayerStateManager keeps the exact same public API, so the Flask routes, templates, and UI are unchanged (only the engine underneath swaps out). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
1 KiB
Text
30 lines
1 KiB
Text
# Copy this file to .env and fill in real values.
|
|
# .env is gitignored -- never commit real secrets.
|
|
# Values must be simple (no spaces / shell-special chars) -- this file is both
|
|
# parsed by the app and sourced by deploy.sh.
|
|
|
|
# --- App login (custom login form) ---
|
|
MEDIAPI_USERNAME=changeme
|
|
MEDIAPI_PASSWORD=changeme
|
|
|
|
# --- Media ---
|
|
# colon-separated list of directories to browse
|
|
MEDIAPI_MEDIA_ROOTS=/localmedia
|
|
MEDIAPI_PORT=8080
|
|
|
|
# --- mpv (the actual player) ---
|
|
# mediapi drives mpv over its JSON IPC Unix socket. install.sh installs mpv and
|
|
# runs it as a service on KMS with --input-ipc-server pointed at this socket.
|
|
#MEDIAPI_MPV_SOCKET=/run/mediapi/mpv.sock
|
|
|
|
# --- System: the Linux user the systemd services run as ---
|
|
# Auto-detected from whoever runs install.sh (id -un) when left unset, so you
|
|
# normally don't need this. Uncomment only to force a specific user.
|
|
#MEDIAPI_USER=pi
|
|
|
|
# --- WiFi access point (re-applied by install.sh) ---
|
|
MEDIAPI_WIFI_COUNTRY=US
|
|
MEDIAPI_AP_SSID=changeme
|
|
MEDIAPI_AP_PASSWORD=changeme
|
|
MEDIAPI_AP_CONN_NAME=mediapi-ap
|
|
|