Skip to content

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

docs: Update CHANGELOG, provider docs, player headers, and test counts for MovieBox v4.0.01 playback fixes

Samir Hossains80cd3c8e656d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 73a1fc4..933df37 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## [Unreleased]
### Added
+- **Live stream verification test suite (`tests/live_stream_verification.rs`)**: Integrated end-to-end verification verifying movie and series stream resolution against live backend endpoints and asserting absence of legacy notice hashes.
- **Unified Command Hub landing design**: Redesigned the homepage landing screen into a single cohesive, proportional modal container seamlessly combining the search bar, embedded provider pill (`[MovieBox · Ctrl+P]`), live suggestions, recent favorites, and quick command shortcuts.
- **Details Screen Subtitles Shortcut (`[s]`)**: Added `s`/`S` keyboard shortcut on Details screen to open the subtitle language picker, matching mouse click and footer hints.
- **Theme picker 3-point color swatches**: Rendered 3-point color swatches (`■ ■ ■` Accent | Surface | Base) previewing palette colors in `/theme`.
@@ -131,6 +132,8 @@
### Changed
- **Framed landing favorites deck**: Enclosed the landing Favorites list in a matching bordered card with embedded `★ Favorites` header, perfectly aligning item titles, `▌ ` pointer cursors, and right-aligned `YYYY Movie/Series` tags with the search deck above.
+- **MovieBox client version spoofing upgrade**: Updated MovieBox client identity spoofing to APK `v4.0.01.0813.03` with version codes `50020117..50020121` (`src/providers/moviebox/crypto.rs`), ensuring full backend compatibility and preventing notice video substitution.
+- **Explicit 480p and 360p resolution badges**: Standardized quality tags and badges for `480p` and `360p` across details stream tables and basic terminals, replacing generic `SD` labels.
- **Homepage landing optical spacing & card separation**: Increased vertical breathing margin between ASCII header and search deck, separated search input into a dedicated 3-row framed card, and formatted favorites as an aligned standalone deck with proper vertical rhythm.
- **Streamlined 1-line mode switcher**: Simplified bottom navigation bar to `[Ctrl+S] Stream · [Ctrl+T] TV · [Ctrl+A] Addon [?] Help [q] Quit`, eliminating duplicate provider text.
- **Clean search suggestion dropdown card**: Removed block background color styling on the outer borders and attached dropdown directly beneath the input prompt, eliminating contrasting 4-sided background halo artifacts.
@@ -161,6 +164,9 @@
- **Search Suggestions Overlay Bleed**: Wrapped search suggestions in an elevated, bordered card with opaque background clearing (`theme.surface0`), and gated terminal graphics poster rendering while typing suggestions, eliminating text and image collisions over background search results.
- **Season Download Stream Error Recovery**: Prevented download queue stalls when resolving individual episode stream URLs fails; failed streams report diagnostics and allow the remaining queue to continue.
- **Favorites & Watch History Corruption Recovery**: Corrupted JSON configuration and history state files now rotate to `.corrupt` backups instead of hard deletion, preserving recoverable user data.
+- **MovieBox stream URL replacement with upgrade notice video**: Fixed an issue where the MovieBox backend substituted movie and TV episode stream URLs with a 22-second app upgrade notice video (`1c7de0bd3393702d9191801f15f88f8d.mp4`) when legacy client version headers (`3.0.03.0529.03`) were detected.
+- **Mobile User-Agent forwarding to media players & downloader**: Forwarded the spoofed mobile `User-Agent` to external players (`mpv`, `VLC`, `IINA`) and the download HTTP client, preventing HTTP 428/403 errors when streaming or downloading from `bcdn.hakunaymatata.com`.
+- **Series multi-resolution discovery fallback**: Enhanced `fetch_collection_resolutions()` to inspect `list` array items when `collectionResolutions` is empty, sorting discovered qualities descending and defaulting to `[1080, 720, 480, 360]`.
- **Details Screen Hit-Testing & Selector Alignment**: Aligned mouse hit-testing regions and season/episode selector column geometry across all compact, medium, and wide terminal tiers.
- **Unicode Display Width in Input Widgets**: Single-line text input fields now compute column offsets using visual Unicode width instead of raw character counts, preventing CJK and multi-byte character overflow from wrapping box borders.
- **M3U Playlist Channel Title Parsing**: Channel titles containing commas in `#EXTINF` metadata are now parsed without truncation, preserving complete channel display names.
diff --git a/docs/downloads.md b/docs/downloads.md
index 6475494..505e89c 100644
--- a/docs/downloads.md
+++ b/docs/downloads.md
@@ -15,6 +15,8 @@ and optional segmentation. Orchestration lives in `app/download.rs`.
timeouts apply to streaming reads.
- **Cancel**: an `AtomicBool` cancel flag pauses/resumes cleanly, preserving the
partial file for a later resume.
+- **User-Agent**: the download HTTP client inherits the active provider's mobile `User-Agent`
+ to prevent CDN stream rejections when downloading media segments.
## File names and directories
diff --git a/docs/known-issues.md b/docs/known-issues.md
index 987f6bf..ac8d83c 100644
--- a/docs/known-issues.md
+++ b/docs/known-issues.md
@@ -29,6 +29,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 273 unit and integration tests across 19 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 283 unit and integration tests across 18 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/players.md b/docs/players.md
index 2d11cdb..63107ca 100644
--- a/docs/players.md
+++ b/docs/players.md
@@ -32,11 +32,11 @@ by the image picker, then clamped to a fixed range.
## Headers
-Playback sources (for example 4KHD) may carry `Referer`/`User-Agent` headers.
-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`. The `supports_headers` gate in `app/playback.rs` warns when a
-player cannot satisfy a source's headers.
+Playback sources (for example 4KHD and MovieBox) may carry `Referer`/`User-Agent` headers.
+MovieBox sources forward the client's spoofed Android/Cronet `User-Agent` to satisfy CDN
+stream requirements. 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`.
+The `supports_headers` gate in `app/playback.rs` warns when a player cannot satisfy a source's headers.
## Subtitles
diff --git a/docs/providers.md b/docs/providers.md
index 2b4c121..8b9ae6b 100644
--- a/docs/providers.md
+++ b/docs/providers.md
@@ -34,8 +34,13 @@ which `app/playback.rs::launch_player` feeds to the external player.
## MovieBox
- Base host pool + per-request HMAC-MD5 signature, client token, and a spoofed Android
- device identity (`crypto.rs`) to satisfy the anti-bot gateway.
+ device identity (`crypto.rs`) spoofing APK `v4.0.01.0813.03` (`version_codes: 50020117..50020121`)
+ to satisfy the backend gateway and prevent notice video substitution.
- Hosts are retried; a shared runtime token is re-initialized when all hosts fail.
+- Mobile `User-Agent` generated by the crypto module is forwarded through playback and download
+ pipelines to satisfy CDN anti-bot checks.
+- Multi-resolution discovery (`fetch_collection_resolutions`) dynamically discovers available
+ stream resolutions with descending quality sorting.
- Title normalization lives in `moviebox/title.rs` (`clean_moviebox_title`).
## 4KHDHub
diff --git a/docs/testing.md b/docs/testing.md
index e132b47..2eb5624 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 **273 automated tests across 19 test suites** (144 unit tests in `src/lib.rs`, 0 binary tests in `src/main.rs`, and 129 integration tests across 16 test suites in `tests/`), running fully offline by default without mocking or live network dependencies.
+The test suite comprises **283 automated tests across 18 test suites** (150 unit tests in `src/lib.rs`, 0 binary tests in `src/main.rs`, and 133 integration tests across 17 test 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:
@@ -35,7 +35,8 @@ MovieBox-TUI/
├── real_acceptance.rs # Opt-in live artifact downloads, SHA256 integrity, & version verify
├── version_upgrade_e2e.rs # Offline (mock-server) end-to-end upgrade execution
├── addons_manifest.rs # Addon manifest deserialization & catalog checks
- └── favorites_lifecycle.rs # Favorites persistence, identity, and navigation lifecycle
+ ├── favorites_lifecycle.rs # Favorites persistence, identity, and navigation lifecycle
+ └── live_stream_verification.rs # Live MovieBox CDN signed stream & resolution verification (opt-in)
```
### A. Inline Unit Tests (`src/**/*.rs`)
@@ -62,6 +63,7 @@ Integration tests live in the `tests/` directory and test externally observable
- **`m3u_integration.rs`**: Validates parsing of standard, single-quoted, double-quoted, and unquoted M3U playlists using fixtures.
- **`addons_manifest.rs`**: Validates deserialization of Cinemeta/Stremio addon manifests, series vs movie metadata classification, multi-season episode decomposition, episode stream isolation (`parse_season_episode`), token and codec parsing, and movie stream regressions.
- **`url_security.rs`**: Validates HTTP/HTTPS URL detection and Windows reserved device stem sanitization (`CON`, `AUX`, `PRN`, `NUL`, `COM1-9`, `LPT1-9`).
+- **`live_stream_verification.rs`**: Validates real-world MovieBox CDN stream link resolution for movies and TV series, verifying that the backend returns valid signed MP4 streams and that legacy upgrade notice hashes (`1c7de0bd...`) are rejected. The tests are `#[ignore]`-gated for offline execution; opt in with `cargo test --test live_stream_verification -- --ignored`.
---