Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
docs: streamline readme, add telegram community badge, and refine architecture guides
Samir Hossains496a36432dbc
diff --git a/README.md b/README.mdindex b9d6755..2c03645 100644--- a/README.md+++ b/README.md@@ -1,44 +1,46 @@# MovieBox-TUI-A fast, lightweight terminal client for streaming and downloading movies, TV shows, anime, and live TV — powered by your local media player.+Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.-[moviebox-tui walkthrough.webm](https://github.com/user-attachments/assets/51802c09-abb1-46dd-bd04-d96a9cf836bb)+[](https://t.me/getfromme)-MovieBox-TUI replaces ad-heavy streaming websites and clunky browser players with a clean, keyboard-driven terminal interface. It scrapes stream links directly from multiple sources and launches playback in your native media player with hardware acceleration, audio track switching, and automatic subtitle synchronization.+[moviebox-tui walkthrough.webm](https://github.com/user-attachments/assets/51802c09-abb1-46dd-bd04-d96a9cf836bb)## Features-- **Multi-Source Streaming**: Search and stream titles across MovieBox, 4KHDHub, BDIX mirrors, custom IPTV playlists, and community Stremio HTTP addons. Press `Ctrl+P` on the Details screen to switch providers in-place.-- **Hardware-Accelerated Playback**: Direct playback in `mpv`, `IINA` (macOS), or `VLC` with stream authentication headers forwarded automatically.-- **Automatic Subtitles**: Automatically searches, downloads, and syncs subtitles in your preferred language directly into your player.-- **Season Batch Downloads**: Download individual episodes or entire seasons with one keypress (`d`), with HTTP range resume support and clean folder structure (`Movies/` and `Series/`).-- **Interactive Settings Hub**: Configure your default media player, download folder, content modes, and themes inside an in-app visual modal via `/settings` (`Ctrl+S`).-- **Modes**: Switch between Streaming and Live TV (`Ctrl+T`), with community Stremio addons available directly as a streaming provider.-- **Ergonomics & Themes**: Full keyboard navigation (vim-style `j`/`k`, `/`, `Tab`) and mouse support (click, scroll, drag) with 6 built-in themes (Catppuccin, TokyoNight, Nord, Dracula, Gruvbox, Rosé Pine) and terminal theme autodetection.+- **On Demand Streaming**: Stream movies, series, and anime across multiple providers and community Stremio addons.+- **Live TV and IPTV**: Import custom M3U playlist URLs to search channels, browse categories, and stream live television.+- **Native Video Playback**: Plays directly in your favorite player (`mpv`, `IINA`, `VLC`, or Android video players) with smooth hardware acceleration.+- **Automatic Subtitles**: Automatically searches and loads subtitles in your preferred language into your player.+- **Fast Downloads**: Save single episodes or entire seasons to your computer with pause and resume support.+- **Visual Posters**: Displays cover art and movie posters directly inside your terminal window.+- **Library and History**: Bookmark your favorite titles and pick up watching right where you left off.+- **Custom Themes**: Built in color themes and settings to match your personal terminal look and feel.+- **Cross Platform**: Works identically on macOS, Linux, Windows, and Android.## Prerequisites-MovieBox-TUI delegates video decoding to an external media player. Install at least one of the following:+Requires at least one media player for streaming:++- **mpv** (recommended across Linux, macOS, and Windows)+- **IINA** (macOS)+- **VLC** (cross platform)+- **Any Android Video Player** via Termux (VLC, Just Player, MX Player)-| Player | Platform | Quick Install |-| :--- | :--- | :--- |-| **mpv** *(Recommended)* | Linux, macOS, Windows | `brew install mpv` / `sudo apt install mpv` / `winget install mpv` |-| **IINA** | macOS (Native GUI) | `brew install --cask iina` |-| **VLC** | Cross-platform | `brew install --cask vlc` / `sudo apt install vlc` / `winget install VideoLAN.VLC` |-| **Android Player** | Android (Termux) | `pkg install -y termux-tools termux-am` *(launches external player)* |+*Poster graphics:* Image rendering requires a graphics capable terminal (Ghostty, Kitty, WezTerm, or iTerm2). Standard terminals display clean text layouts automatically.++*Optional for MovieBox downloads:* `yt-dlp` and `ffmpeg` are required only for downloading DASH streams from the MovieBox provider. All other providers download directly with the built in engine.## Installation-### macOS & Linux+### macOS and Linux-Install via the automated script:+Automated install:```bashcurl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh | bash```-> **Raspberry Pi & Linux ARM64**: Prebuilt Linux ARM64 binaries (`MovieBox_Linux_arm64.tar.gz`) are statically linked musl executables with 64KB page alignment, supporting Raspberry Pi 4B (4KB pages), Raspberry Pi 5 (16KB pages), and ARM cloud servers. Prebuilt binaries require a 64-bit userland (`aarch64`). On 32-bit Raspberry Pi OS (`armhf`), install via Cargo (`cargo install moviebox-tui --locked`).--*macOS users can also install via Homebrew:*+Homebrew (macOS):```bashbrew tap mesamirh/moviebox-tui https://github.com/mesamirh/MovieBox-Tuibrew trust mesamirh/moviebox-tui@@ -47,31 +49,29 @@ brew install moviebox-tui### Windows-Install via PowerShell:+PowerShell:```powershellirm https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.ps1 | iex```### Android (Termux)-Install Termux tools and the intent bridge, download the native precompiled Android ARM64 binary via the installer, and grant storage permissions:+Termux:```bashpkg update && pkg install -y curl tar termux-tools termux-am-curl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh -o install.sh && bash install.sh+curl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh | bashtermux-setup-storage```-> **Video Playback on Android**: Playback on Android is handled by external video player apps (**VLC**, **MX Player**, **Just Player**, or **MPV Android APK**) launched via Android Intent. Installing CLI `mpv` inside Termux (`pkg install mpv`) provides terminal/audio-only output because Android does not expose a desktop video surface to terminal sessions.-<details>-<summary><b>Manual & Developer Builds (Cargo)</b></summary>+<summary><b>Cargo and Source Build</b></summary>-Install directly from crates.io:+From crates.io:```bashcargo install moviebox-tui --locked```-Or compile from source:+From source:```bashgit clone https://github.com/mesamirh/MovieBox-Tui.gitcd MovieBox-Tui@@ -92,34 +92,22 @@ gh attestation verify <archive-file> -R mesamirh/MovieBox-Tui## Quick Start-Launch the application:```bashmoviebox-tui```-- **Interactive Help**: Press `?` inside the app anytime to view the mode-aware keyboard shortcuts and mouse guide.-- **Settings**: Type `/settings` or press `Ctrl+S` to configure your default player, download directory, and content modes.-- **Controls Reference**: See [`docs/controls.md`](docs/controls.md) for the complete list of keybindings, mouse actions, and slash commands.+- Type any title to search, press `Enter` to play.+- Press `?` anytime for shortcuts, or type `/settings` for preferences.## Documentation-Comprehensive guides are available online at [**mesamirh.github.io/MovieBox-Tui**](https://mesamirh.github.io/MovieBox-Tui/) or locally in the [`docs/`](docs/) directory:--- [Controls & Shortcuts](docs/controls.md) — Complete keybindings, navigation, and slash commands-- [Media Players](docs/players.md) — Player options, custom paths, and launch flags-- [Downloads & Organization](docs/downloads.md) — Multi-segment download engine and folder layout-- [Live TV](docs/tv-mode.md) — Adding and managing custom M3U playlists-- [Addon Mode](docs/addons-mode.md) — Installing and managing Stremio HTTP addons-- [Configuration](docs/config.md) — `config.json` reference and `MOVIEBOX_*` environment variables-- [Providers](docs/providers.md) — Supported content sources and resolver protocols-- [Architecture](docs/architecture.md) — Subsystem map, event loop, and caching model-- [Documentation Index](docs/README.md) — Full documentation directory+Comprehensive guides and architectural references are available at [**mesamirh.github.io/MovieBox-Tui**](https://mesamirh.github.io/MovieBox-Tui/) or in the [`docs/`](docs/) directory.## Contributing-Contributions are welcome! Please review [CONTRIBUTING.md](CONTRIBUTING.md) before submitting pull requests.+Contributions are welcome. Review [CONTRIBUTING.md](CONTRIBUTING.md) before submitting pull requests.-If you encounter a bug or have a feature request, feel free to open an [issue](https://github.com/mesamirh/MovieBox-Tui/issues).+Report bugs or submit feature requests through [GitHub Issues](https://github.com/mesamirh/MovieBox-Tui/issues).<details><summary><b>Optional Support</b></summary>@@ -135,6 +123,10 @@ If you would like to support ongoing development directly:</details>+## Privacy++MovieBox-TUI contains zero telemetry, analytics, or user tracking. All search history, bookmarks, and configuration files remain strictly on your local filesystem.+## LicenseLicensed under either [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE).diff --git a/docs/README.md b/docs/README.mdindex 975d04e..ba5d403 100644--- a/docs/README.md+++ b/docs/README.md@@ -1,31 +1,35 @@# Introduction-A fast, lightweight terminal client for streaming and downloading movies, TV shows, anime, and live TV — powered by your local media player.+Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.-[moviebox-tui walkthrough.webm](https://github.com/user-attachments/assets/51802c09-abb1-46dd-bd04-d96a9cf836bb)+[](https://t.me/getfromme)-MovieBox-TUI replaces ad-heavy streaming websites and clunky browser players with a clean, keyboard-driven terminal interface. It scrapes stream links directly from multiple sources and launches playback in your native media player with hardware acceleration, audio track switching, and automatic subtitle synchronization.+[moviebox-tui walkthrough.webm](https://github.com/user-attachments/assets/51802c09-abb1-46dd-bd04-d96a9cf836bb)## Features-- **Multi-Source Streaming**: Search and stream titles across MovieBox, 4KHDHub, BDIX mirrors, custom IPTV playlists, and community Stremio HTTP addons. Press `Ctrl+P` on the Details screen to switch providers in-place.-- **Hardware-Accelerated Playback**: Direct playback in `mpv`, `IINA` (macOS), or `VLC` with stream authentication headers forwarded automatically.-- **Automatic Subtitles**: Automatically searches, downloads, and syncs subtitles in your preferred language directly into your player.-- **Season Batch Downloads**: Download individual episodes or entire seasons with one keypress (`d`), with HTTP range resume support and clean folder structure (`Movies/` and `Series/`).-- **Interactive Settings Hub**: Configure your default media player, download folder, content modes, and themes inside an in-app visual modal via `/settings` (`Ctrl+S`).-- **Modes**: Switch between Streaming and Live TV (`Ctrl+T`), with community Stremio addons available directly as a streaming provider.-- **Ergonomics & Themes**: Full keyboard navigation (vim-style `j`/`k`, `/`, `Tab`) and mouse support (click, scroll, drag) with 6 built-in themes (Catppuccin, TokyoNight, Nord, Dracula, Gruvbox, Rosé Pine) and terminal theme autodetection.+- **On Demand Streaming**: Stream movies, series, and anime across multiple providers and community Stremio addons.+- **Live TV and IPTV**: Import custom M3U playlist URLs to search channels, browse categories, and stream live television.+- **Native Video Playback**: Plays directly in your favorite player (`mpv`, `IINA`, `VLC`, or Android video players) with smooth hardware acceleration.+- **Automatic Subtitles**: Automatically searches and loads subtitles in your preferred language into your player.+- **Fast Downloads**: Save single episodes or entire seasons to your computer with pause and resume support.+- **Visual Posters**: Displays cover art and movie posters directly inside your terminal window.+- **Library and History**: Bookmark your favorite titles and pick up watching right where you left off.+- **Custom Themes**: Built in color themes and settings to match your personal terminal look and feel.+- **Cross Platform**: Works identically on macOS, Linux, Windows, and Android.## Prerequisites-MovieBox-TUI delegates video decoding to an external media player. Install at least one of the following:+Requires at least one media player for streaming:++- **mpv** (recommended across Linux, macOS, and Windows)+- **IINA** (macOS)+- **VLC** (cross platform)+- **Any Android Video Player** via Termux (VLC, Just Player, MX Player)++*Poster graphics:* Image rendering requires a graphics capable terminal (Ghostty, Kitty, WezTerm, or iTerm2). Standard terminals display clean text layouts automatically.-| Player | Platform | Quick Install |-| :--- | :--- | :--- |-| **mpv** *(Recommended)* | Linux, macOS, Windows | `brew install mpv` / `sudo apt install mpv` / `winget install mpv` |-| **IINA** | macOS (Native GUI) | `brew install --cask iina` |-| **VLC** | Cross-platform | `brew install --cask vlc` / `sudo apt install vlc` / `winget install VideoLAN.VLC` |-| **Android Player** | Android (Termux) | `pkg install -y termux-tools termux-am` *(launches external player)* |+*Optional for MovieBox downloads:* `yt-dlp` and `ffmpeg` are required only for downloading DASH streams from the MovieBox provider. All other providers download directly with the built in engine.---diff --git a/docs/architecture.md b/docs/architecture.mdindex 1994cc9..2a23bea 100644--- a/docs/architecture.md+++ b/docs/architecture.md@@ -4,65 +4,105 @@ MovieBox-Tui is a terminal client (ratatui + crossterm + tokio) for streaming moseries and TV channels from multiple providers. This document describes the shape of thecode and how data flows through it.-## Module map-+## System Architecture & Data Flow++```text+ ┌────────────────────────────────────────────────────────┐+ │ Terminal User Input & Events │+ │ Crossterm KeyPress / MouseClick / WindowResize / Tick│+ └───────────────────────────┬────────────────────────────┘+ │+ ▼+ ┌────────────────────────────────────────────────────────┐+ │ EventHandler Channel (mpsc::channel) │+ │ Dispatches serialized Action messages │+ └───────────────────────────┬────────────────────────────┘+ │+ ▼+ ┌────────────────────────────────────────────────────────┐+ │ App Event Loop & State Machine (Single Thread) │+ │ src/tui/app/run.rs ─── Mutates AppState atomically │+ └──────────────┬───────────────────────────┬─────────────┘+ │ │+ UI Render Pass │ Async IO Tasks │ Background Workers+ ▼ ▼+ ┌───────────────────────────┐ ┌───────────────────────────────────┐+ │ Ratatui Terminal Frame │ │ Tokio Multi-Thread Runtime │+ │ Screens / Widgets / Toast │ │ tokio::spawn / spawn_blocking │+ └───────────────────────────┘ └─┬───────────────┬───────────────┬─┘+ │ │ │+ ▼ ▼ ▼+ ┌────────────────┐┌─────────────┐┌─────────────────┐+ │ Scrapers & Net ││ Disk Cache ││ Media Players & │+ │ Providers & TV ││ MessagePack ││ Loopback Proxy │+ └────────────────┘└─────────────┘└─────────────────┘```++## Subsystem Breakdown & Module Tree++```textsrc/- main.rs entry point: logging init, panic hook, raw mode,- alternate screen, App::new + App::run- lib.rs crate root, module declarations- cache.rs disk cache: provider-namespaced, TTL'd, atomic writes- config.rs Config load/save (config.json)- download.rs download engine (resume, ranges, segments, retry)- favorites.rs starred-titles persistence (favorites.json)- history.rs watch history persistence- logging.rs file logging (rotation, sanitization)- models.rs shared domain models (SearchResult, BrowseMetrics, StreamPool,- Notification, SubjectIdentity)- net.rs fallback DNS resolution, HTTP client builder, URL validation- player.rs player detection (OnceLock) and command construction (mpv/VLC/IINA/Android)- providers/- mod.rs provider module tree- models.rs shared typed models (ProviderKind, CatalogItem,- MediaDetails, Release, PlaybackSource, …)- moviebox/ primary provider (client + request signing)- fourkhdhub/ 4KHDHub provider (client, hubcloud resolver, parser)- bdix/circleftp/ BDIX CircleFTP provider- bdix/dhakaflix/ BDIX DhakaFlix provider- addons/ Community HTTP addons provider- tv/ Live TV / IPTV provider (M3U parser and models)- service.rs MovieBoxService headless engine (search, details, streams, captions)- updater/ GitHub release update check (mod, check, download, verify,- extract, apply, artifact)- tui/- app/ the application object and all behavior- mod.rs App struct, App::new, helpers- run.rs terminal event loop (run), rendering (draw),- and handle_action dispatcher (thin routing table)- network.rs poster fetch + provider dispatch helpers- search.rs search command routing, search request setup,- provider search dispatch, poster prefetch- playback.rs player launching + playback actions- download.rs download orchestration actions- favorites.rs favorite toggle/open actions, /favorites virtual list- requests.rs suggest/history/homepage/details/preview/- episode-stream actions- navigation.rs list navigation, submit actions, provider helpers- tv.rs TV mode: playlist manager + playback- addons.rs Addon manager modal + HTTP addon actions- keyboard.rs raw key-event handling- mouse.rs mouse click handling and hitbox routing- system.rs help, refresh, cache, theme, updates, focus, resize- state.rs AppState: all UI state + in-memory LRU caches- action.rs the Action enum (event/message model)- commands.rs Slash command registry, parsing, and suggestions- event.rs EventHandler: input events + tick → Action channel- overlay.rs popups, pickers, notifications- screens/ render-only modules (home, details, help)- terminal.rs terminal capability probes- theme.rs color themes- widgets/ reusable widgets (badge, input, modal, poster, scrollbar, settings)- text.rs grapheme-safe text helpers and zero-allocation cursor slicing+├── main.rs # Application entrypoint & CLI dispatcher+├── lib.rs # Crate root and module declarations+│+├── Core Engine & Networking+│ ├── models.rs # Domain entities (CatalogItem, MediaDetails, Release)+│ ├── service.rs # Central multi-provider facade & aggregation engine+│ ├── net.rs # Hickory DNS fallback resolver & HTTP client builders+│ ├── logging.rs # Rotating file logger with path/URL privacy sanitization+│ └── proxy.rs # Detached loopback HTTP proxy & DASH manifest rewriter+│+├── Storage & Persistence+│ ├── cache.rs # Binary MessagePack cache (MBC1 header) with atomic writes+│ ├── config.rs # User configuration schema & atomic persistence (config.json)+│ ├── favorites.rs # Bookmark storage & deduplication (favorites.json)+│ ├── history.rs # Watch progress, latched resume, & state reconciliation+│ └── download.rs # Chunked multi-segment downloader with HTTP range resume+│+├── Media Providers (`src/providers/`)+│ ├── models.rs # Provider traits (Provider, ReleaseProvider) & capabilities+│ ├── moviebox/ # CloudFront signed requests, token generation, & scraper+│ ├── fourkhdhub/ # 4K releases, HTML parser, & HubCloud mirror resolver+│ ├── bdix/ # BDIX optical intranet scrapers (CircleFTP, DhakaFlix)+│ │ └── common.rs # Centralized codec, resolution, & language heuristics+│ ├── addons/ # Community Stremio HTTP addon manifest & stream aggregator+│ └── tv/ # IPTV M3U playlist parser & stream normalizer+│+├── Player & Process Supervisor+│ ├── player.rs # Player detection (mpv, IINA, VLC, Android) & command builder+│ └── player/tracker.rs # Embedded Lua tracker script (moviebox_tracker.lua)+│+├── Self-Updater (`src/updater/`)+│ ├── check.rs # GitHub release API version checker+│ ├── download.rs # Streaming release archive downloader+│ ├── verify.rs # Cryptographic SHA-256 checksum validator+│ ├── extract.rs # Tar.gz and Zip extractor with path traversal guard+│ └── apply.rs # Atomic executable replacement & Windows helper script+│+└── Presentation & TUI (`src/tui/`)+ ├── action.rs # Unified Action enum message bus+ ├── event.rs # Crossterm terminal input event listener & tick driver+ ├── state.rs # Centralized AppState & LRU memory caches+ ├── commands.rs # Slash command registry (/settings, /browse, /exit)+ ├── terminal.rs # Terminal capability & graphics protocol detection+ ├── theme.rs # Theme registry (Catppuccin, TokyoNight, Nord, etc.)+ ├── text.rs # Grapheme-safe input buffer & Unicode measurement+ ├── overlay.rs # Toasts, modals, confirmation dialogues, & picker frames+ ├── screens/ # Declarative renderers (home.rs, details.rs, help.rs)+ ├── widgets/ # Modular widgets (badge, input, modal, poster, settings)+ └── app/ # State machine action handlers & event loop+ ├── run.rs # Main event loop (App::run) & frame drawing+ ├── keyboard.rs # Keyboard shortcuts & vim navigation router+ ├── mouse.rs # Mouse click hit-testing & drag coordinates+ ├── navigation.rs # Grid steps, pagination, & screen transitions+ ├── requests.rs # Async metadata & stream request dispatchers+ ├── playback.rs # Player process launching & crash supervision+ ├── download.rs # Download queue manager & progress bar updates+ ├── search.rs # Search input handler & poster prefetching+ ├── favorites.rs # Favorite bookmarks handler+ ├── tv.rs # IPTV channel manager & playlist actions+ ├── addons.rs # Stremio addon manager actions+ └── system.rs # Terminal resize, theme switching, & self-update UI```## The event loopdiff --git a/docs/cross-platform.md b/docs/cross-platform.mdindex df1ef82..e9f7ee7 100644--- a/docs/cross-platform.md+++ b/docs/cross-platform.md@@ -1,9 +1,7 @@# Cross-platform-Build targets: macOS, Linux, Windows, and Android (Termux via the Linux ARM64-binary). The codebase uses-`crossterm` (all platforms), `ratatui`, and a couple of small per-OS branches.-+Build targets: macOS, Linux, Windows, and Android (Termux). The codebase uses+`crossterm`, `ratatui`, and focused platform integrations."Build target" does not mean every runtime integration is verified on everydevice. Desktop builds are covered by CI; external players and Termux requirethe release checks in [`release-checklist.md`](release-checklist.md).@@ -14,7 +12,7 @@ the release checks in [`release-checklist.md`](release-checklist.md).| :--- | :--- || macOS | IINA preferred player (via the installed IINA `iina-cli`); VLC/mpv `.app` paths detected. `process_group(0)` on spawn. || Windows | mpv/VLC detected via Program Files + `%LOCALAPPDATA%`; path-safe file stems; static MSVC CRT linking (`+crt-static`) for zero-dependency standalone binaries; handle-safe atomic download replacement (dropping file handles before renames); background process spawning (registry queries, yt-dlp downloader, and update helper) hardened with canonical `CREATE_NO_WINDOW` (`0x08000000`). |-| Linux | Flatpak mpv/VLC supported (`flatpak run …`); xdg data/cache dirs. Linux ARM64 binaries (`MovieBox_Linux_arm64.tar.gz`) are fully static musl executables linked with 64KB ELF segment alignment (`-Wl,-z,max-page-size=65536`) for seamless compatibility across 4KB kernels (Raspberry Pi 4B), 16KB kernels (Raspberry Pi 5 / BCM2712), and 64KB kernels (AWS Graviton, RHEL/Fedora ARM). |+| Linux | Flatpak mpv/VLC supported (`flatpak run …`); xdg data/cache dirs. Linux ARM64 binaries (`MovieBox_Linux_arm64.tar.gz`) are fully static musl executables linked with 64KB ELF segment alignment (`-Wl,-z,max-page-size=65536`) for compatibility across 4KB, 16KB, and 64KB page kernels. || Android (Termux) | Targets `aarch64-linux-android` linked against the Android NDK (Clang API 24+) and system Bionic `libc.so`, producing a native ELF executable with a valid `PT_PHDR` program header table and `/system/bin/linker64` dynamic loader. This eliminates `Could not find a PHDR: broken executable?` crashes and executes natively without on-device compilation. Includes a pure-Rust DNS resolver that reads system configuration and falls back to public resolvers (Cloudflare, Google, Quad9) for zero-config name resolution. Android playback delegates to external video players (VLC for Android, Just Player, MX Player, MPV Android) via Termux intent dispatchers (`termux-open`, `termux-open-url`, `termux-am`), requiring `pkg install -y termux-tools termux-am`. To protect against Android 10+ SELinux execute restrictions (exit code 126), system `/system/bin/am` fallbacks are strictly avoided in Termux; `LD_PRELOAD` is preserved for Termux applets while `PATH` is sanitized for system calls. Android intent playback supports unauthenticated streams (CircleFTP, DhakaFlix, IPTV) and standard CDN streams (4KHDHub). Real-device chooser behavior is a release prerequisite. |## Terminal capabilitiesdiff --git a/docs/installation.md b/docs/installation.mdindex ef26519..b7af66c 100644--- a/docs/installation.md+++ b/docs/installation.md@@ -4,17 +4,15 @@ MovieBox-TUI is available across macOS, Linux, Windows, and Android (Termux).----## macOS & Linux+## macOS and Linux-Install via the automated script:+Automated install:```bashcurl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh | bash```-> **Raspberry Pi & Linux ARM64**: Prebuilt Linux ARM64 binaries (`MovieBox_Linux_arm64.tar.gz`) are statically linked musl executables with 64KB page alignment, supporting Raspberry Pi 4B (4KB pages), Raspberry Pi 5 (16KB pages), and ARM cloud servers. Prebuilt binaries require a 64-bit userland (`aarch64`). On 32-bit Raspberry Pi OS (`armhf`), install via Cargo (`cargo install moviebox-tui --locked`).--### macOS via Homebrew+Homebrew (macOS):```bashbrew tap mesamirh/moviebox-tui https://github.com/mesamirh/MovieBox-Tui@@ -26,7 +24,7 @@ brew install moviebox-tui## Windows-Install via PowerShell (run in Windows Terminal or PowerShell 5.1+):+Install via PowerShell:```powershellirm https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.ps1 | iex@@ -36,25 +34,14 @@ irm https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.ps1 | i## Android (Termux)-Install Termux tools and the intent bridge, run the installer script to fetch the precompiled native Android ARM64 binary, and grant storage permissions:+Termux:```bashpkg update && pkg install -y curl tar termux-tools termux-am-curl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh -o install.sh && bash install.sh+curl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh | bashtermux-setup-storage```-The installer automatically downloads the native Android ARM64 release package (`MovieBox_Android_arm64.tar.gz`) built against the Android NDK and Bionic libc, requiring zero on-device compilation.--> **Media Player Requirements**: Android streams are rendered through external Android video players (such as **VLC for Android**, **MX Player**, **Just Player**, or **MPV Android APK**) triggered via `termux-open` or `termux-am`. Command-line `mpv` installed directly in Termux (`pkg install mpv`) runs without a video output surface unless an X11 desktop environment (like Termux:X11) is configured.--To compile from source on Termux:--```bash-pkg install -y rust clang-cargo install moviebox-tui --locked-```----## Cargo (Crates.io)diff --git a/docs/known-issues.md b/docs/known-issues.mdindex 5aa82a6..58b6c5c 100644--- a/docs/known-issues.md+++ b/docs/known-issues.md@@ -27,6 +27,6 @@ Tracked here so future work and issue reports reference the same facts.## Verification-- Automated testing is enforced via `cargo test --all-features --locked` covering 346+ unit and integration tests across 21 test suites (see [`docs/testing.md`](testing.md)). The count is updated when tests change; it does not replace real-player and real-device verification.+- Automated testing is enforced via `cargo test --all-features --locked` covering 400+ unit and integration tests across 11 test suites (see [`docs/testing.md`](testing.md)). The count is updated when tests change; it does not replace real-player and real-device verification.- Static correctness is enforced by strict compiler type checking, the lint gate (`cargo clippy --all-targets --all-features --locked -- -D warnings`), formatting (`cargo fmt --check`), dependency vulnerability scanning (`cargo audit`), and packaging verification (`cargo package --locked`).- Runtime and platform-specific behavior (terminal resize, focus handling, external player launch, and Termux chooser) are verified through the release checklist in [`release-checklist.md`](release-checklist.md).diff --git a/docs/modules.md b/docs/modules.mdindex 3592dfd..3524229 100644--- a/docs/modules.md+++ b/docs/modules.md@@ -48,6 +48,10 @@ src/tracker.rs Injected Lua tracker script (`moviebox_tracker.lua`) andperiodic 5-second playback state auto-saving.+ proxy.rs Detached loopback HTTP proxy: handles signed CloudFront cookie+ streams for VLC and Android Intent playback, rewrites DASH manifests,+ and serves streams and subtitles over localhost.+providers/mod.rs Module declarations.models.rs Shared typed models (ProviderKind, CatalogItem, MediaDetails,diff --git a/docs/players.md b/docs/players.mdindex 29dea10..9e877bd 100644--- a/docs/players.md+++ b/docs/players.md@@ -32,7 +32,7 @@ Playback sources (for example 4KHD and MovieBox) may carry `Referer`/`User-AgentMovieBox DASH streams additionally carry signed `Cookie` headers for CloudFront authentication.mpv/IINA send them via `http-header-fields` (`--http-header-fields=...` or `--mpv-http-header-fields=...`),while VLC maps them to `--http-referrer` / `--http-user-agent`. Android intent playback forwards `Referer`/`User-Agent` extras when using `am`/`termux-am`, and supports unauthenticated streams (CircleFTP, DhakaFlix, IPTV) and CDN streams natively.-The `supports_headers` gate in `app/playback.rs` validates whether a player can satisfy required stream headers. For VLC, signed CloudFront `Cookie` streams (such as MovieBox DASH manifests) are supported via an automatic detached loopback sidecar proxy (`--proxy-for-vlc`). The proxy injects the signed CloudFront cookies and auth headers server-side and streams chunks directly to VLC, running as an independent process group on Unix and a detached process on Windows so playback survives terminal closure. If an unproxied player cannot satisfy a stream's headers (such as Android Intent attempting to play signed Cookie streams), playback will not silently fall back to an alternative player. Instead, an explicit warning notification informs the user of the lack of header support, prompting them to switch to a supported player or install one for their operating system (`mpv`, `IINA`, or `VLC`).+The `supports_headers` gate in `app/playback.rs` validates whether a player can satisfy required stream headers. For VLC and Android Intent, signed CloudFront `Cookie` streams (such as MovieBox DASH manifests) are automatically supported via the detached loopback sidecar proxy (`--proxy-for-vlc`). The proxy injects the signed CloudFront cookies and auth headers server-side and streams chunks directly over localhost.## Subtitles- mpv receives the remote subtitle URL directly (`--sub-file=<url>`); mpv fetches itdiff --git a/docs/testing.md b/docs/testing.mdindex 5bab0e6..b4e0b42 100644--- a/docs/testing.md+++ b/docs/testing.md@@ -4,7 +4,7 @@ This document describes the testing architecture, quality assurance procedures,## 1. Test Architecture-The test suite comprises **320+ automated tests across 10 test suites** (213 unit tests in `src/lib.rs` and 110 integration tests across 9 focused suites in `tests/`), running fully offline by default without mocking or live network dependencies.+The test suite comprises **400+ automated tests across 10 test suites** (294 unit tests in `src/lib.rs` and 125+ integration tests across 10 focused suites in `tests/`), running fully offline by default without mocking or live network dependencies.The MovieBox-TUI test architecture follows a strict separation of concerns:```text