Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

style(player): standardize player display label to MPV

Samir Hossains9f4b454af9ee
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 309e7dd..827cf9b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@
- Served Termux private-storage subtitles over the local `StreamRelay` `/sub/` loopback endpoint when Android shared storage is unavailable, and restricted startup subtitle cleanup to internal cache and temp folders.
- Parsed player `stderr` and exit codes to report specific failure reasons (`HTTP 403`, `HTTP 404`, `HTTP 410`, timeout, connection refused), and added deterministic cross-platform contract integration tests (`tests/player_contract.rs`) asserting VLC Win32/UNC paths, IINA CLI option schemas, and header support across OSes.
- Unified IINA command construction with standard `--mpv-*` argument schemas across platforms, and restricted macOS IINA header disqualification to GUI app fallbacks missing command line tools.
+ - Standardized player display labels to uppercase acronyms (MPV, IINA, VLC) across player selection popups, settings, and notifications.
- **StreamRelay Proxy & Downloader**:
- Forwarded `User-Agent` and `Referer` while isolating stream cookies (`Cookie: Edge-Cache-Cookie=...`) to same-host requests across `StreamRelay`, subtitle pre-downloads, and media downloads.
- Capped `.m4s` segment chunk fetching in `StreamRelay` to batches of 16 concurrent `Range` requests, registered in-flight segment wait futures under lock, and required `http://` or `https://` schemes on `/proxy?url=` routes.
diff --git a/docs/players.md b/docs/players.md
index c86d1c5..d2f88d0 100644
--- a/docs/players.md
+++ b/docs/players.md
@@ -6,15 +6,15 @@ MovieBox-TUI delegates playback to external media players (`mpv`, `IINA`, `VLC`,
Players are detected in priority order and cached across runs:
-- **macOS**: `IINA` → `mpv` → `VLC`
+- **macOS**: `IINA` → `MPV` → `VLC`
- Searches `/Applications`, `~/Applications`, Homebrew, MacPorts, Nix, and native CLI tools.
-- **Linux**: `mpv` → `VLC`
+- **Linux**: `MPV` → `VLC`
- Searches `$PATH`, `~/.local/bin`, Flatpak exports (`io.mpv.Mpv`, `org.videolan.VLC`), and Snap.
-- **Windows**: `mpv` → `VLC`
+- **Windows**: `MPV` → `VLC`
- Searches `%LOCALAPPDATA%`, `Program Files`, WinGet packages, Scoop shims, Chocolatey, and Windows Registry `App Paths`.
-- **Android / Termux**: `Android Intent` (headless CLI) or `mpv` → `VLC` → `Android Intent` (graphical X11/Wayland desktop)
+- **Android / Termux**: `Android Intent` (headless CLI) or `MPV` → `VLC` → `Android Intent` (graphical X11/Wayland desktop)
- In headless terminal environments without an active display server, dispatches directly to external Android media apps via `termux-open` or `am start`.
- - In graphical environments with an active display server (`$DISPLAY` or `$WAYLAND_DISPLAY`, such as Xfce in udroid/PRoot or Termux:X11), native desktop players (`mpv`/`VLC`) are prioritized so playback opens in a desktop window.
+ - In graphical environments with an active display server (`$DISPLAY` or `$WAYLAND_DISPLAY`, such as Xfce in udroid/PRoot or Termux:X11), native desktop players (`MPV`/`VLC`) are prioritized so playback opens in a desktop window.
You can set a default player via `/settings` (Media Player), or override it with the `MOVIEBOX_PLAYER` environment variable.
diff --git a/src/player.rs b/src/player.rs
index c35bee7..d40e88c 100644
--- a/src/player.rs
+++ b/src/player.rs
@@ -26,7 +26,7 @@ pub enum PlayerKind {
impl PlayerKind {
pub fn label(&self) -> &'static str {
match self {
- PlayerKind::Mpv => "mpv",
+ PlayerKind::Mpv => "MPV",
PlayerKind::Iina => "IINA",
PlayerKind::Vlc => "VLC",
PlayerKind::AndroidIntent => "Android Player",
diff --git a/src/tui/state.rs b/src/tui/state.rs
index 4642a6a..a7b88ec 100644
--- a/src/tui/state.rs
+++ b/src/tui/state.rs
@@ -111,7 +111,7 @@ impl SettingsCategory {
pub fn settings_player_label(choice: Option<&str>) -> &'static str {
match choice {
None | Some("auto") => "None",
- Some("mpv") => "mpv",
+ Some("mpv") => "MPV",
Some("vlc") => "VLC",
Some("iina") => "IINA",
Some("android") => "Android Player",
diff --git a/tests/player_contract.rs b/tests/player_contract.rs
index 46a1dff..fea71c8 100644
--- a/tests/player_contract.rs
+++ b/tests/player_contract.rs
@@ -224,3 +224,11 @@ fn test_player_supports_headers_contract_matrix() {
"AndroidIntent must support headers (via StreamRelay loopback)"
);
}
+
+#[test]
+fn test_player_display_labels_contract() {
+ assert_eq!(PlayerKind::Mpv.label(), "MPV");
+ assert_eq!(PlayerKind::Iina.label(), "IINA");
+ assert_eq!(PlayerKind::Vlc.label(), "VLC");
+ assert_eq!(PlayerKind::AndroidIntent.label(), "Android Player");
+}