Skip to content

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

docs: synchronize changelog, addon mode guide, and test suite counts

Samir Hossains44bc26421d8b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7185754..da0c5a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -106,6 +106,12 @@
- **Rate-Limiting & Concurrency Hardening**:
- Added HTTP 429 `Retry-After` header parsing with bounded exponential backoff in `MovieBoxClient`.
- Added semaphore concurrency limiting (`Semaphore::new(2)`) during parallel episode page resolution to prevent burst requests from tripping provider rate limiters.
+- **Addon Mode Series Hierarchy & Episode Stream Isolation**:
+ - Fixed series misclassification as movies in Addon Mode when metadata omitted the `videos` array by ensuring canonical season structures and series-first metadata endpoint prioritization.
+ - Added regex and token-based episode stream isolation (`parse_season_episode`) in `stream_item_to_release`, preventing cross-episode stream pollution (e.g. S01E06 streams appearing when viewing S01E08).
+ - Added preservation of `episodeNumbers` arrays from addon metadata in the season list state.
+- **Direct Addon & BDIX Playback & Download Dispatch**:
+ - Fixed Addon and BDIX playback and download routing in `handle_playback` and `handle_download` to dispatch directly to external media players and the chunk downloader, preserving custom HTTP headers (`behaviorHints.headers`) and source labels without unnecessary Moviebox API subtitle timeouts.
- **Selector Tab Preservation in Standard Displays**:
- Maintained visibility of Audio Languages, Seasons, and Episodes selector tabs side-by-side in standard ~80-column terminals when focusing Streams, preventing tabs from disappearing when 0 streams are available.
diff --git a/docs/addons-mode.md b/docs/addons-mode.md
index 45483b6..9c3a70b 100644
--- a/docs/addons-mode.md
+++ b/docs/addons-mode.md
@@ -9,7 +9,9 @@ Addon Mode enables support for community HTTP addon manifests. You can install a
- **Direct HTTP Stream Engine**: Automatically extracts and filters direct Cloudflare R2, PixelDrain, direct video CDN, and HubCloud/HubDrive HTTP streams.
- **Multi-Addon Concurrency**: Simultaneously queries all enabled stream addons and aggregates releases.
- **Quality & Size Parsing**: Ranks streams by quality (`4K UHD / 2160p`, `1080p`, `720p`, `SD`), file size in GB/MB, and audio language tracks (e.g. `[Dual]`, `[Multi]`, `Hindi + English`).
-- **Torrent Blocking Detection**: Automatically detects if an addon's streams are 100% blocked raw torrents (e.g. Torrentio without Debrid) and alerts the user that only HTTP streams are supported.
+- **Series & Episode Hierarchy**: Series are automatically organized into explicit `Seasons` and `Episodes` selector panes. Selecting any episode drives episode-specific stream requests (`/stream/series/:id:season:episode.json`).
+- **Episode Stream Isolation**: Built-in token parsing (`parse_season_episode`) guarantees that only streams matching the selected season and episode are displayed, eliminating cross-episode stream mixing.
+- **Direct Playback & Custom Headers**: Video stream headers (`behaviorHints.headers`) such as `Referer` and `User-Agent` are preserved and forwarded directly to external media players (`mpv`, `IINA`, `VLC`) and the multi-segment downloader.
- **Watch History & Progress Parity**: Full `/history` support in Addon Mode with real-time `mpv` position tracking, scrub lines, and auto-resume.
- **High-Performance Caching**: Curated `/browse` catalogs are cached for `1 hour`, manifests for `24 hours`, and stream aggregations for `2 hours`.
diff --git a/docs/known-issues.md b/docs/known-issues.md
index 5f5b57a..578ed96 100644
--- a/docs/known-issues.md
+++ b/docs/known-issues.md
@@ -26,6 +26,6 @@ Tracked here so future work and issue reports reference the same facts.
## Verification
-- Automated testing is enforced via `cargo test --locked` covering 31 unit and integration tests across critical algorithms, state reconciliation, crypto signing, M3U parsing, and cross-platform player path sanitization (see [`docs/testing.md`](testing.md)).
+- Automated testing is enforced via `cargo test --locked` covering 45 unit and integration tests across critical algorithms, state reconciliation, crypto signing, M3U parsing, addon manifests, episode stream isolation, and cross-platform player path sanitization (see [`docs/testing.md`](testing.md)).
- Static correctness is enforced by strict compiler type checking, the lint gate (`cargo clippy --all-targets --all-features -- -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/testing.md b/docs/testing.md
index 2092b0a..4f0a63e 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -40,7 +40,7 @@ Integration tests live in the `tests/` directory and test externally observable
- **`cache_lifecycle.rs`**: Validates atomic file writing (both sync and async) and deterministic MD5 cache key generation.
- **`player_integration.rs`**: Validates MPV script options path sanitization on Windows (`\` $\rightarrow$ `/`) and Unix.
- **`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-style addon manifest structures.
+- **`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`).
---