mediapi/mediapi
Jean-Michel Tremblay afe1ab3e2f Replace mpv with Kodi as the player; mediapi drives it over JSON-RPC
Playback moves to Kodi (standalone on GBM/KMS -- the smooth, hardware-decoded
LibreELEC path). mediapi becomes a thin remote: it browses media and controls
Kodi over its JSON-RPC HTTP API. This drops every mpv/DRM/X-mirror problem
(DRM-master exclusivity, gpu-next "export failed" wedges, X-mirror A/V desync,
software-decode choppiness) -- none of which had a working single config.

- new mediapi/kodi.py (stdlib JSON-RPC client); player.py rewritten to poll
  and drive Kodi (Player.Open/PlayPause/Seek, Application.SetVolume,
  Player.GetProperties), same public interface + keep-playing auto-advance
- config.py: KODI_* settings replace MPV_SOCKET; __init__ + api_routes updated
- delete mpv_ipc.py, the mpv/X units, start-mpv/session scripts
- new systemd/mediapi-kodi.service.template (standalone Kodi on tty1) +
  scripts/configure-kodi.py (headlessly enable Kodi's JSON-RPC web server)
- install.sh now bootstraps a BARE Pi OS Lite end to end: apt base packages,
  installs uv, installs Kodi, enables its web API, configures the AP, installs
  + starts services (only git need be preinstalled). Auto-seeds .env from the
  example on first run.
- README + .env.example updated for the Kodi architecture

Dual HDMI is handled in hardware (external splitter off one port); no software
mirror -- see git history for why that can't work smoothly on this Pi.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 22:42:04 -04:00
..
routes Replace mpv with Kodi as the player; mediapi drives it over JSON-RPC 2026-07-07 22:42:04 -04:00
static Initial mediapi: WiFi AP + media browser with HDMI playback control 2026-07-05 21:45:57 -04:00
templates Initial mediapi: WiFi AP + media browser with HDMI playback control 2026-07-05 21:45:57 -04:00
__init__.py Replace mpv with Kodi as the player; mediapi drives it over JSON-RPC 2026-07-07 22:42:04 -04:00
auth.py Initial mediapi: WiFi AP + media browser with HDMI playback control 2026-07-05 21:45:57 -04:00
config.py Replace mpv with Kodi as the player; mediapi drives it over JSON-RPC 2026-07-07 22:42:04 -04:00
kodi.py Replace mpv with Kodi as the player; mediapi drives it over JSON-RPC 2026-07-07 22:42:04 -04:00
media.py Initial mediapi: WiFi AP + media browser with HDMI playback control 2026-07-05 21:45:57 -04:00
player.py Replace mpv with Kodi as the player; mediapi drives it over JSON-RPC 2026-07-07 22:42:04 -04:00