Skip to content

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

docs: normalize unicode typesetting and add responsive mobile styles

Samir Hossains4d3590833c90
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b39495d..bc5381e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,10 @@
- Added empty-header guard to `supports_headers`, ensuring streams without authentication requirements are never falsely rejected as incompatible.
- Forwarded `User-Agent`, `Referer`, and subtitles (`subtitles_location` and `subs`) as intent extras when dispatching playback via `am` or `termux-am`.
- Prevented circular provider switch prompts when playing 4KHDHub streams by tailoring notification hints based on the active provider.
+- **Documentation Mobile Layout & Typesetting Normalization**:
+ - Replaced unparsed LaTeX syntax (`$\to$`, `$\ge$`, `$\mu\text{s}$`, `$N\times$`) across all documentation guides with standard Unicode characters (`→`, `≥`, `µs`, `N×`), eliminating raw unrendered markup in mdBook output.
+ - Added responsive documentation stylesheet (`docs/custom.css`) integrated via `book.toml`, enabling smooth touch horizontal scrolling, compact cell padding, visible scrollbars, and dynamic code text wrapping across mobile and small screen viewports.
+ - Formatted provider matrix table in `docs/providers.md` with explicit column alignments and bold provider labels to optimize scannability on narrow screens.
## [0.1.16] - 2026-09-05
### Added
diff --git a/book.toml b/book.toml
index 9172ed9..e9da68a 100644
--- a/book.toml
+++ b/book.toml
@@ -10,6 +10,7 @@ preferred-dark-theme = "navy"
git-repository-url = "https://github.com/mesamirh/MovieBox-Tui"
edit-url-template = "https://github.com/mesamirh/MovieBox-Tui/edit/main/{path}"
site-url = "/MovieBox-Tui/"
+additional-css = ["docs/custom.css"]
[output.html.fold]
enable = true
diff --git a/docs/addons-mode.md b/docs/addons-mode.md
index 71241c5..663c8fc 100644
--- a/docs/addons-mode.md
+++ b/docs/addons-mode.md
@@ -21,7 +21,7 @@ Addon Mode enables support for community HTTP addon manifests. You can install a
- `Ctrl+S`: Return to standard **Streaming Mode**.
- `Ctrl+T`: Toggle **TV Mode**.
- `/browse`: Browse curated addon catalogs (`Top Movies`, `Top Series`, `Top Rated Movies`, `Top Rated Series`).
-- `/settings` $\to$ Content Modes: Enable or disable Addon Mode navigation.
+- `/settings` → Content Modes: Enable or disable Addon Mode navigation.
## Addon Manager
diff --git a/docs/cache.md b/docs/cache.md
index f8bdb08..3fada77 100644
--- a/docs/cache.md
+++ b/docs/cache.md
@@ -31,7 +31,7 @@ The cache directory is `dirs::cache_dir()/moviebox-tui` (macOS
- **TTL**: Streams expire after 2h; search/details/captions/manifests after 24h; homepage/catalogs after 1h; remote TV playlists after 24h; images after 30 days. Local M3U files are reread from disk directly without caching.
- **Atomic writes**: Entries are written to a unique temp file (`path.with_extension("tmp-PID-STAMP")`) and atomically replaced (`durable_replace`), preventing truncated or corrupt files on unexpected exits.
- **Validation**: Empty search or stream results are never written or served from cache.
-- **Purge**: Background cleanup runs at startup to delete entries older than 7 days. `/settings` $\to$ Maintenance $\to$ Clear Disk Cache recursively empties all cached provider responses, images, TV playlists, temporary subtitles across Android/Windows/Unix, resets in-memory LRU caches, and cancels in-flight background request tasks.
+- **Purge**: Background cleanup runs at startup to delete entries older than 7 days. `/settings` → Maintenance → Clear Disk Cache recursively empties all cached provider responses, images, TV playlists, temporary subtitles across Android/Windows/Unix, resets in-memory LRU caches, and cancels in-flight background request tasks.
## In-memory caches (AppState)
diff --git a/docs/config.md b/docs/config.md
index 8e551a5..934ba78 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -13,9 +13,9 @@ macOS `~/Library/Application Support/moviebox-tui`, Linux `~/.config/moviebox-tu
| `active_provider` | string | Last provider (`moviebox`, `fourkhdhub`, …). |
| `active_theme` | string | Theme name. |
| `bdix_enabled` | bool | Show BDIX providers (Bangladesh-only). |
-| `streaming_enabled` | bool | Enable Streaming Mode navigation in bottom dock (`/settings` $\to$ Content Modes). |
-| `tv_enabled` | bool | Enable TV Mode navigation in bottom dock (`/settings` $\to$ Content Modes). |
-| `addons_enabled` | bool | Enable Addon Mode navigation in bottom dock (`/settings` $\to$ Content Modes). |
+| `streaming_enabled` | bool | Enable Streaming Mode navigation in bottom dock (`/settings` → Content Modes). |
+| `tv_enabled` | bool | Enable TV Mode navigation in bottom dock (`/settings` → Content Modes). |
+| `addons_enabled` | bool | Enable Addon Mode navigation in bottom dock (`/settings` → Content Modes). |
| `default_player` | string or null | Preferred player: `mpv`, `iina`, `vlc`, `android`; absent/null until you choose one from the in-app picker. |
| `download_dir` | string or null | Custom directory for video and subtitle downloads (null uses OS default). |
diff --git a/docs/controls.md b/docs/controls.md
index d4f827f..743c437 100644
--- a/docs/controls.md
+++ b/docs/controls.md
@@ -58,7 +58,7 @@ All popup dialogs (Theme picker, Browse categories, Settings Media Player picker
## Mode-Specific Controls
### Streaming Mode
-- **`Ctrl+P`**: Cycle content providers (`MovieBox` $\to$ `4KHDHub` $\to$ `BDIX`). On the Details screen, re-searches and fetches alternate streams for the current movie in-place.
+- **`Ctrl+P`**: Cycle content providers (`MovieBox` → `4KHDHub` → `BDIX`). On the Details screen, re-searches and fetches alternate streams for the current movie in-place.
- **`←` / `→` / `h` / `l` / `Tab` / `Shift+Tab`**: Switch Details screen selector panes (Audio Languages, Seasons, Episodes, Streams).
- **`Enter`**: Play selected stream or open selected title.
- **`d`**: Download current episode or full season batch.
diff --git a/docs/custom.css b/docs/custom.css
new file mode 100644
index 0000000..528dbf7
--- /dev/null
+++ b/docs/custom.css
@@ -0,0 +1,55 @@
+.table-wrapper {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ margin: 1.2em 0;
+ border-radius: 6px;
+ scrollbar-width: thin;
+ scrollbar-color: var(--table-border-color) transparent;
+}
+
+.table-wrapper::-webkit-scrollbar {
+ height: 5px;
+}
+
+.table-wrapper::-webkit-scrollbar-thumb {
+ background: var(--table-border-color);
+ border-radius: 3px;
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+}
+
+table th {
+ text-align: left;
+ white-space: nowrap;
+}
+
+@media only screen and (max-width: 768px) {
+ table {
+ font-size: 0.88rem;
+ }
+
+ table td, table th {
+ padding: 6px 8px;
+ }
+
+ table code {
+ font-size: 0.82em;
+ word-break: break-word;
+ overflow-wrap: anywhere;
+ white-space: pre-wrap;
+ }
+}
+
+@media only screen and (max-width: 480px) {
+ table td, table th {
+ padding: 5px 6px;
+ font-size: 0.82rem;
+ }
+
+ table code {
+ font-size: 0.78em;
+ }
+}
diff --git a/docs/downloads.md b/docs/downloads.md
index 4f3c328..c26cf9c 100644
--- a/docs/downloads.md
+++ b/docs/downloads.md
@@ -27,7 +27,7 @@ and length is capped.
- **Series downloads:** Saved under `<base_dir>/Series/<Title>/Season <N>/<Title> - S<N:02>E<E:02>.<ext>` (and subtitle `<Title> - S<N:02>E<E:02>.<lang>.<sub_ext>`).
- **Movie downloads:** Saved under `<base_dir>/Movies/<Title>/<Title>.<ext>` (and subtitle `<Title>.<lang>.<sub_ext>`).
- **Default path:** Files go to the user's OS download directory (`~/Downloads/MovieBox-TUI`). On Android-family environments the code prefers shared `storage/downloads` when present.
-- **Custom path:** Users can set a custom download directory in `/settings` $\to$ General $\to$ Download Folder or reset to default. Target directories are validated with a write probe before saving, and the code creates the `MovieBox-TUI` subfolder hierarchy (`Movies/` and `Series/`). If custom storage becomes unavailable at runtime, the engine falls back to the default download location.
+- **Custom path:** Users can set a custom download directory in `/settings` → General → Download Folder or reset to default. Target directories are validated with a write probe before saving, and the code creates the `MovieBox-TUI` subfolder hierarchy (`Movies/` and `Series/`). If custom storage becomes unavailable at runtime, the engine falls back to the default download location.
## Contextual triggers & Seasons
diff --git a/docs/known-issues.md b/docs/known-issues.md
index 6578269..630b894 100644
--- a/docs/known-issues.md
+++ b/docs/known-issues.md
@@ -18,7 +18,7 @@ Tracked here so future work and issue reports reference the same facts.
## Environment-dependent
-- **4KHDHub mirrors rotate and can be expired on upstream hosts.** Direct streams are resolved concurrently across all available release mirrors using prioritized scoring (Cloudflare R2 / S3 / Seekable Streams $\to$ Storage $\to$ PixelDrain API $\to$ Google UserContent / Direct Attachments) and bounded concurrency (`select_ok` in chunks of 3). When all upstream mirrors for an older release are dead/expired (e.g. 404 or expired tokens), the resolver fails fast (<4.5s) and guides the user to select another release.
+- **4KHDHub mirrors rotate and can be expired on upstream hosts.** Direct streams are resolved concurrently across all available release mirrors using prioritized scoring (Cloudflare R2 / S3 / Seekable Streams → Storage → PixelDrain API → Google UserContent / Direct Attachments) and bounded concurrency (`select_ok` in chunks of 3). When all upstream mirrors for an older release are dead/expired (e.g. 404 or expired tokens), the resolver fails fast (<4.5s) and guides the user to select another release.
- **Termux playback needs the device confirmed** on each release: `termux-open` /
`am` availability and the Android chooser behavior. The historical
`rustls-platform-verifier` initialization panic reported for v0.1.12 is not in
diff --git a/docs/players.md b/docs/players.md
index 0139bb2..9996d0c 100644
--- a/docs/players.md
+++ b/docs/players.md
@@ -49,7 +49,7 @@ When launching media with in-progress watch history, the player command automati
- **Immediate Start Registration**: Media sessions are pre-registered into watch history (`record_start`) upon launch, ensuring that fast-exiting intent dispatchers (Android `termux-open` / `am start`, macOS `open -a IINA`) and unexpected terminal terminations retain history immediately.
- **Pre-Seeded State Files**: Before launching mpv or IINA, MovieBox-TUI creates a pending state file populated with metadata (`title`, `cover_url`, `stype`, `release_year`). If the application exits abruptly during playback, `reconcile_from_dir` self-heals and inserts new items into watch history without data loss.
-- **Latched Lua Tracker (`moviebox_tracker.lua`)**: Observes `time-pos` and `duration` every 5 seconds. State file writes are atomic (`.tmp` file flushed and renamed with destination removal for Windows compatibility). Video completion at $\ge 90\%$ or EOF is permanently latched, preventing player shutdown events from resetting completion status. Missing or live stream durations write JSON `null` to prevent invalid duration calculations.
+- **Latched Lua Tracker (`moviebox_tracker.lua`)**: Observes `time-pos` and `duration` every 5 seconds. State file writes are atomic (`.tmp` file flushed and renamed with destination removal for Windows compatibility). Video completion at ≥ 90% or EOF is permanently latched, preventing player shutdown events from resetting completion status. Missing or live stream durations write JSON `null` to prevent invalid duration calculations.
- **Isolated Tracker vs Fallback Reconciliation**: Players with active Lua trackers (`mpv`, `iina-cli`) rely strictly on state file reconciliation, eliminating wall-clock progress overwrite races during pauses or seeks. Process elapsed time is used strictly as a guarded fallback for players without tracker scripts (e.g. VLC).
## Spawning
diff --git a/docs/providers.md b/docs/providers.md
index d82ea76..b49ccc1 100644
--- a/docs/providers.md
+++ b/docs/providers.md
@@ -6,16 +6,16 @@ shared typed models in `providers/models.rs` and the moviebox JSON schema used b
## Provider kinds
-| Kind | Module | Notes |
-| --------------- | -------------------------- | ------------------------------------------- |
-| `MovieBox` | `providers/moviebox` | Primary. Requires request signing (crypto). |
-| `FourKHdHub` | `providers/fourkhdhub` | 4K releases; hubcloud mirror resolver. |
-| `BdixCircleFtp` | `providers/bdix/circleftp` | BDIX FTP directory scrapes. |
-| `BdixDhakaFlix` | `providers/bdix/dhakaflix` | BDIX indexer. |
-| `Addons` | `providers/addons` | Community HTTP addons (Cinemeta, streams). |
+| Provider | Module | Description |
+| :--- | :--- | :--- |
+| **MovieBox** | `providers/moviebox` | Primary provider. Requires request signing (crypto). |
+| **FourKHdHub** | `providers/fourkhdhub` | 4K releases; hubcloud mirror resolver. |
+| **BdixCircleFtp** | `providers/bdix/circleftp` | BDIX FTP directory scrapes. |
+| **BdixDhakaFlix** | `providers/bdix/dhakaflix` | BDIX indexer. |
+| **Addons** | `providers/addons` | Community HTTP addons (Cinemeta, streams). |
BDIX sources are only reachable from supported Bangladeshi ISPs and are hidden by
-default (`bdix_enabled` in config; `/settings` $\to$ Content Modes $\to$ BDIX Sources).
+default (`bdix_enabled` in config; `/settings` → Content Modes → BDIX Sources).
## Shared Provider Contract
@@ -73,7 +73,7 @@ Adding a new streaming or BDIX provider to MovieBox TUI takes 3 simple steps:
- `client.rs::resolve_release` resolves release mirrors concurrently using bounded-concurrency probing (`select_ok` in batches of 3) with a 3.5s per-probe timeout.
- Direct links undergo automatic path percent-encoding normalization (`validate_playback_url`) to handle filenames containing unencoded spaces, brackets, and special characters.
- Preflight probes issue a bounded range probe (`Range: bytes=0-8191`) and inspect response bodies for expired mirror errors (`"Failed to extract link"`, `"Token Expired"`, `"404"`) to fail fast on expired torrents.
-- `hubcloud.rs` scores and prioritizes candidate streams (Cloudflare R2 / S3 / Seekable Streams $\to$ Storage $\to$ PixelDrain API $\to$ Google UserContent / Direct Attachments), automatically decoding base64 `Watch Online` mirrors (`vdplay.pages.dev/?u=...`).
+- `hubcloud.rs` scores and prioritizes candidate streams (Cloudflare R2 / S3 / Seekable Streams → Storage → PixelDrain API → Google UserContent / Direct Attachments), automatically decoding base64 `Watch Online` mirrors (`vdplay.pages.dev/?u=...`).
- **Multilingual audio detection**: `parser.rs::detect_language` parses release titles and
metadata for 30+ regional and international languages (Hindi, Tamil, Telugu, Kannada,
Malayalam, Bengali, Marathi, Punjabi, Gujarati, Urdu, Japanese, Korean, Chinese, Spanish,
diff --git a/docs/testing.md b/docs/testing.md
index 4ddc5e5..1533f23 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -134,9 +134,9 @@ All performance optimizations in MovieBox-TUI must be backed by empirical before
When submitting or claiming a performance improvement, measure and report exact deltas:
1. **CPU & Algorithmic Hot Paths**:
- - Measure wall-clock duration using `std::time::Instant` across $\ge 1,000$ iterations.
+ - Measure wall-clock duration using `std::time::Instant` across ≥ 1,000 iterations.
- Run benchmarks on release builds (`cargo test --release` or isolated binary harness) to reflect production compiler optimizations.
- - Report: Baseline vs. Optimized duration in microseconds ($\mu\text{s}$) or milliseconds ($\text{ms}$), plus relative speedup ($N\times$).
+ - Report: Baseline vs. Optimized duration in microseconds (µs) or milliseconds (ms), plus relative speedup (N×).
2. **Memory & Allocations**:
- Count heap allocations and memory footprint deltas on hot paths (e.g., zero-copy slices vs. cloned `String` or `Vec`).