No description
- Lua 64.7%
- Rust 31.7%
- Shell 2.9%
- JavaScript 0.4%
- Just 0.2%
emmylua_check 0.20.0 intermittently panics (Rust exit code 101) under load, notably in the pre-push hook (which runs 'just qa' after fmt+clippy) — causing ~3/5 pre-pushes to fail at check-lua despite the gate passing standalone. check-lua now retries emmylua_check up to 3x on exit 101 (panic); real diagnostics (exit 1) propagate immediately and are not retried. Note: emmylua_check 0.24.0 (latest) is panic-free but adds ~1700 new diagnostics + 487 unresolved-require config issues — a noisy regression deferred for a separate diagnostics pass. Pinning 0.20.0 + retry keeps the gate reliable without hiding real diagnostics. |
||
|---|---|---|
| crates | ||
| mpv-media-center | ||
| mpv-ui | ||
| plugins | ||
| scripts | ||
| tests | ||
| .emmyrc.json | ||
| .gitignore | ||
| .luacov | ||
| .rumdl.toml | ||
| .rusty-hook.toml | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
| stylua.toml | ||
| tombi.toml | ||
mpv-media-player
A full-featured media center for mpv with a Rust backend daemon.
Features
- Browse and play videos from YouTube, Twitch, PeerTube, Mixcloud, torrents
- Local media browser with metadata (movies, TV shows, music, pictures)
- IPTV/M3U playlist support with live stream checking
- Subscription feed across platforms
- 30+ themes, TV mode for 10-foot interface
- Plugin system for adding new video sources
Quick Start
# Build everything and install to ~/.config/mpv
just build
# Run mpv
mpv --idle
# Press Ctrl+t to open media center
Requirements
- mpv 0.35+
- Rust toolchain (for building backend)
- yt-dlp
- ffmpeg/ffprobe
Repository Structure
mpv-media-player/
├── mpv-media-center/ # Media center UI (Lua)
├── mpv-ui/ # Reusable UI framework (Lua)
├── crates/
│ ├── media-center-backend/ # Backend daemon (Rust): mpv IPC, WebSocket, scanner, torrent, privacy
│ ├── mpv-common/ # Shared types for the ecosystem
│ ├── mpv-remote-core/ # Shared client library for remote control clients (WASM-ready)
│ └── mpv-remote-gtk/ # GTK4/libadwaita remote control app
└── tests/ # Unit and integration tests
Documentation Index
Getting Started
| Document | Description |
|---|---|
| AGENTS.md | Start here for AI agents - Architecture, patterns, workflows |
| mpv-media-center/README.md | Usage, configuration, keyboard shortcuts |
| crates/media-center-backend/README.md | Backend API reference, IPC protocol |
| mpv-ui/README.md | UI framework overview |
Media Center (Lua Application)
| Document | Description |
|---|---|
| mpv-media-center/AGENTS.md | Component-specific AI instructions |
| Architecture | |
| _docs/architecture/ | System design, state management, IPC |
| _docs/architecture/state.md | State structure and patterns |
| _docs/architecture/plugins.md | Plugin system internals |
| Views | |
| _docs/views/ | View specifications |
| _docs/views/movies.md | Movies view spec |
| _docs/views/tvshows.md | TV Shows view with drill-down |
| _docs/views/live.md | IPTV/Live streams view |
| _docs/views/mytubes.md | MyTubes container (feed, search, subscriptions) |
| Services | |
| _docs/services/ | Business logic documentation |
| _docs/services/navigation.md | Tab/view navigation |
| _docs/services/config.md | Configuration system |
| Guides | |
| _docs/guides/tv-mode.md | TV mode scaling system |
| _docs/guides/theme-system.md | Theming guide |
| _docs/guides/style-guidelines.md | Code style conventions |
| Plugins | |
| _docs/FRONTEND_PLUGINS.md | Frontend plugin API reference |
| UI Components | |
| _docs/ui-components/overlays.md | TV playback overlays |
UI Framework (mpv-ui)
| Document | Description |
|---|---|
| _docs/ARCHITECTURE.md | Module organization, design patterns |
| _docs/COMPONENTS.md | Component API reference |
| _docs/ANIMATION.md | Animation system |
Backend Daemon (Rust)
| Document | Description |
|---|---|
| AGENTS.md | Backend-specific AI instructions |
| _docs/README.md | Backend specification + IPC protocol |
Remote Clients (Rust)
Mobile/web remote control for the media center, connecting to the backend's WebSocket (port 9764):
| Crate | Description |
|---|---|
| mpv-common | Shared types (MediaType, Source) for the ecosystem |
| mpv-remote-core | Shared client library: WebSocket client + protocol + state (WASM-ready) |
| mpv-remote-gtk | GTK4/libadwaita remote control app (Relm4) |
Testing
| Document | Description |
|---|---|
| tests/lua/README.md | Lua test runner and patterns |
Development
# Watch mode - auto-sync on file changes
just dev
# Run backend in foreground with logs
just run-backend
# Run tests
just test
# Lint
just lint
License
MIT