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>
15 lines
306 B
Text
15 lines
306 B
Text
[Unit]
|
|
Description=MediaPi Flask app
|
|
After=network-online.target mediapi-mpv.service
|
|
Wants=network-online.target mediapi-mpv.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=${MEDIAPI_USER}
|
|
WorkingDirectory=${PROJECT_DIR}
|
|
ExecStart=${UV} run run.py
|
|
Restart=on-failure
|
|
RestartSec=2
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|