Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
docs: streamline README and modularize controls reference
Samir Hossains45057b18b327
diff --git a/README.md b/README.mdindex 83473e9..a0f6906 100644--- a/README.md+++ b/README.md@@ -2,128 +2,77 @@# MovieBox-TUI-Search, browse, play, and download movies, series, anime, and IPTV streams from a keyboard-first terminal interface with full mouse support using external media players.+Watch and download movies, TV shows, anime, and live TV right in your terminal — without opening a browser.[](https://crates.io/crates/moviebox-tui)+[](https://crates.io/crates/moviebox-tui)[](https://github.com/mesamirh/MovieBox-Tui/actions/workflows/ci.yml)-[](#requirements)-[](#license)+[](#license)<video src="https://github.com/user-attachments/assets/e3dc0c11-524f-4b0e-8902-e0c66d6ca88d" alt="MovieBox-TUI demo" width="85%" autoplay loop muted></video></div>-## Documentation--This README is the project landing page (features, install, usage). The full-documentation set — architecture, providers, players, cache, logging, TV mode,-configuration, and debugging — lives in [`docs/`](docs/README.md). Contribution-guidance is in [`CONTRIBUTING.md`](CONTRIBUTING.md).--## Features--### Catalogs & Browsing--- Search and browse movies, TV series, and anime from multiple content catalogs-- Inspect stream quality groupings, multilingual audio tracks, and subtitle options before playback--> **Note on BDIX:** BDIX sources are only accessible from supported Bangladeshi ISP networks. Because of this, they are hidden by default. You can enable them manually if your network supports it.--### Playback--- Play streams directly in your local media player (mpv, VLC, or IINA)-- Play protected streams seamlessly without manual configuration+## Why MovieBox-TUI?-### Downloads+Searching and watching media through web browsers often means dealing with heavy memory usage from multiple open tabs, intrusive popups, tracking scripts, and clunky web players.-- Contextual downloads: download entire seasons or single episodes with one click/key-- Automatic subtitle language selection applied across all season episodes-- Resume interrupted downloads without losing progress+**MovieBox-TUI replaces the web browser workflow with a lightweight terminal interface.** It extracts stream links directly and launches them in your preferred local media player (`mpv`, `VLC`, or `IINA`), with no ads or popups inside the application.-### IPTV+### Quick Comparison-- Watch live TV by loading remote or local `.m3u` playlists organized by category+| Feature | Streaming in a Web Browser | MovieBox-TUI in Your Terminal |+| :--- | :--- | :--- |+| **Resource Usage** | Heavy browser process overhead | **~5 MB RAM (no web engine required)** |+| **In-App Experience** | Popups, redirects, and tracking scripts | **No ads or popups inside the application** |+| **Video Player** | Browser web player | **Direct playback in mpv, VLC, or IINA** |+| **Account & Login** | Forced account creation & signups | **No account or login required** |+| **Subtitles** | Manual search and file renaming | **Automatic subtitle downloads in your language** |+| **Downloads** | Manual single-file downloads | **1-click full season batch downloads** |+| **File Organization** | Cluttered downloads folder | **Clean, organized Movies and Series folders** |-### User Interface & App+## Features at a Glance-- Full mouse and keyboard controls: click search, suggestions, cards, tabs, and action buttons directly-- Minimal tree-branch autocomplete suggestions with helpful slash command descriptions-- View rich graphical posters in supported terminals (Kitty, iTerm2, Sixel) or fallback to text art-- Let the app automatically manage configuration and clean up expired caches--MovieBox-TUI resolves links from upstream services. Availability can change when those services change, and some mirrors are region- or rate-limit-dependent.--## Requirements--- 64-bit Windows, macOS, Linux, or Android (Termux)-- Terminal size of at least 50×14 (80×24+ recommended for optimal poster & metadata layout)-- One supported player: mpv, VLC, IINA, or any native Android video player-- Internet connection+- **Search Everything:** Find movies, TV shows, anime, and live TV channels across multiple sources (MovieBox, 4KHDHub, BDIX mirrors, and custom IPTV playlists).+- **Smooth Video Playback:** Plays directly in **mpv**, **VLC**, or **IINA** using your computer's hardware for smooth video.+- **Easy Downloads:** Download single episodes or entire seasons with one keypress. Completed episodes are skipped automatically.+- **Simple Terminal Interface:** Full keyboard and mouse support, beautiful color themes, and movie poster art.## Installation-Prebuilt binaries are available for macOS, Linux, and Windows releases. The official install scripts verify the release SHA-256 checksum automatically.-On Termux, install from TUR or build from source with `cargo install` on-device.+### Cargo-### macOS or Linux+```bash+cargo install moviebox-tui --locked+```-#### Homebrew+### Homebrew (macOS & Linux)```bashbrew tap mesamirh/moviebox-tui https://github.com/mesamirh/MovieBox-Tuibrew install mesamirh/moviebox-tui/moviebox-tui```-The formula selects the correct macOS, Linux x86_64, or Linux ARM64 release.--#### Install script+### Install Script (macOS & Linux)```bashcurl -fsSL https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.sh | bash```-The script features multi-tier animations, automatic SHA256 checksum verification, media player detection, and non-destructive shell PATH configuration. Supports `--version <tag>`, `--dir <path>`, `--force`, and `--uninstall`.-### Windows-Works in PowerShell or Command Prompt (cmd):-```cmdpowershell -Command "irm https://raw.githubusercontent.com/mesamirh/MovieBox-Tui/main/install.ps1 | iex"```-The installer selects x86_64 or ARM64, verifies checksums, installs under `%LOCALAPPDATA%\Programs\MovieBox-Tui\bin`, and automatically adds the directory to your user PATH. Supports `-Version <tag>`, `-InstallDir <path>`, `-Force`, and `-Uninstall`.-### Android (Termux)-MovieBox-Tui runs natively in Termux and opens videos through the Android app chooser on supported devices.--Preferred install via TUR (Termux User Repository):-```bashpkg install tur-repopkg install moviebox-tuitermux-setup-storage```-TUR packages are distributed separately from crates.io. New MovieBox-Tui GitHub-releases may take some time to appear in TUR, and users still need to update-packages normally in Termux (for example via `pkg upgrade`). Termux playback-should be rechecked on real devices for each release.-If you previously installed MovieBox-Tui with `cargo install`, see-[Troubleshooting](#troubleshooting) for the Termux PATH fix.--Alternative source-based install:--```bash-pkg install rust openssl pkg-config-cargo install moviebox-tui --locked-termux-setup-storage-```--_`termux-setup-storage` is recommended if you want downloads saved to the real-Android `Download` folder._-<details><summary><b>Build from source</b></summary>@@ -133,307 +82,67 @@ cd MovieBox-Tuicargo build --release --locked```-Binary location: `target/release/moviebox-tui` (`moviebox-tui.exe` on Windows).-</details>-## Supported Players--MovieBox-TUI checks standard application locations, PATH executables, and Linux Flatpak installations.--Detected automatically:--- **macOS:** `/Applications`, `~/Applications`, Homebrew/PATH-- **Linux:** PATH, Flatpak mpv, Flatpak VLC-- **Windows:** PATH, common Program Files locations, Microsoft Store aliases--Portable or custom installations can be selected with environment variables:--| Player | Variable |-| ------ | -------------------- |-| mpv | `MOVIEBOX_MPV_PATH` |-| VLC | `MOVIEBOX_VLC_PATH` |-| IINA | `MOVIEBOX_IINA_PATH` |--You can also force the preferred detected player order with:--```bash-export MOVIEBOX_PLAYER=mpv-```--macOS/Linux example:--```bash-export MOVIEBOX_MPV_PATH="$HOME/Apps/mpv"-moviebox-tui-```--Windows PowerShell example:--```powershell-$env:MOVIEBOX_VLC_PATH = "D:\Apps\VLC\vlc.exe"-moviebox-tui-```--IINA is macOS-only. mpv provides the broadest source-header compatibility. Android intent playback depends on device chooser behavior and cannot attach subtitles.-## Usage-Run:+Start the app:```bashmoviebox-tui```-### Keyboard shortcuts--| Key | Action |-| ---------- | ----------------------------------------------------- |-| Arrow keys | Navigate lists, grids, seasons, episodes, and dialogs |-| Enter | Open or confirm selection |-| Esc | Close dialog or go back |-| `o` | Choose another player |-| `d` | Download selected episode or season |-| `r` | Refresh current content |-| `Ctrl+P` | Switch content provider |-| `Ctrl+T` | Toggle IPTV mode |-| `?` | Show help |-| `Ctrl+C` / `q` | Quit application and restore terminal |--### Mouse controls--| Action | Result |-| ------ | ------ |-| Left click search bar | Enter search query input mode |-| Left click suggestion item | Select and search suggestion immediately |-| Left click search result row | Select item and preview; click again / double click to open details |-| Left click audio / season / episode / stream | Switch audio language, change season, select episode, or play stream |-| Left click footer buttons | Switch provider (`[Ctrl+P]`), toggle TV mode (`[Ctrl+T]`), open help (`[?]`), or quit (`[q]`) |-| Left click modal items / buttons | Select theme, browse preset, subtitles, players, or confirm download/cancel |-| Left click outside modal | Dismiss popup |--### Slash commands--| Command | Action |-| -------------------- | ----------------------------------------- |-| `/browse` | Browse curated, rated, and most-watched views |-| `/download-dir` | View, change, or reset download directory |-| `/history` | Show watch history |-| `/list` | Show IPTV channels |-| `/config` | Configure IPTV playlists |-| `/github` | Open the project repository |-| `/theme` | Open the theme picker |-| `/update` | Check for a newer release |-| `/toggle-update` | Enable or disable automatic update checks |-| `/clear-cache` | Remove cached application data |-| `/enable-bdix` | Enable BDIX FTP sources |-| `/disable-bdix` | Disable BDIX FTP sources |--`/update` checks availability and shows the release location; it does not replace the running binary. Re-run the installer or Homebrew upgrade command to update.--Choosing a player from `Open with` updates the saved default player for later launches,-unless `MOVIEBOX_PLAYER` is set in the environment.--## Downloads--By default, downloads are stored under the operating system Downloads directory:--```text-MovieBox-TUI/-├── Movies/-│ └── <title>/-│ ├── <title>.<ext>-│ └── <title>.<lang>.<sub_ext>-└── Series/- └── <title>/- └── Season <number>/- ├── <title> - S01E01.<ext>- └── <title> - S01E01.<lang>.<sub_ext>-```--- **Custom download directory:** Use `/download-dir <path>` (e.g. `/download-dir ~/Videos` or `/download-dir /Volumes/Drive`) to change and persist your download folder. Use `/download-dir reset` to return to default.-- **Contextual triggers:** Pressing `d` or clicking `[Download]` while focused on the **Seasons** pane prompts to download the whole season; while on **Episodes** or **Streams**, it downloads that single episode.-- **Sequential downloads & Duplication prevention:** Entire seasons are downloaded one by one. Existing completed episodes are automatically skipped to save bandwidth and prevent duplicate files.-- **Smart subtitle tagging:** Subtitles are saved with ISO 639-1 language codes (e.g. `.en.srt`, `.hi.srt`) so media players (VLC, mpv, IINA) and media servers (Plex, Jellyfin, Kodi) automatically identify track languages. Missing subtitles do not discard completed video files.-- **Robust resuming:** Interrupted downloads preserve `.part` and metadata files, and can be resumed without losing progress.-- On Android/Termux, the app prefers shared `storage/downloads` when it exists.--## Configuration & Cache--MovieBox-TUI uses standard OS directories:--| Platform | Configuration | Cache |-| -------- | -------------------------------------------- | ------------------------------------------ |-| Linux | `${XDG_CONFIG_HOME:-~/.config}/moviebox-tui` | `${XDG_CACHE_HOME:-~/.cache}/moviebox-tui` |-| macOS | `~/Library/Application Support/moviebox-tui` | `~/Library/Caches/moviebox-tui` |-| Windows | `%APPDATA%\moviebox-tui` | `%LOCALAPPDATA%\moviebox-tui` |--Catalog providers use separate cache namespaces. Expired or invalid cache entries are discarded automatically; files older than seven days are cleaned at startup.--The current theme, active provider, default player, BDIX visibility, and update-preferences are persisted in `config.json`. See [`docs/config.md`](docs/config.md)-for the full config and environment-variable reference.--## Updates--Automatic update checks only notify you about new releases. They do not update the application automatically.--Homebrew:--```bash-brew update-brew upgrade moviebox-tui-```--Script installation: run the install command again.--Windows PowerShell: run the install command again.--Cargo:--```bash-cargo install moviebox-tui --locked --force-```--## Uninstallation--Homebrew:--```bash-brew uninstall moviebox-tui-brew untap mesamirh/moviebox-tui-```--Script installation:--```bash-sudo rm -f /usr/local/bin/moviebox-tui-rm -f "$HOME/.local/bin/moviebox-tui"-```--Windows PowerShell:--```powershell-Remove-Item -Recurse -Force "$env:LOCALAPPDATA\MovieBox-Tui"-```--Cargo:--```bash-cargo uninstall moviebox-tui-```--Configuration and cache directories remain until removed manually.--## Troubleshooting--<details>-<summary><b>No media player found</b></summary>--MovieBox-TUI relies on external players. If it says none are found:--1. Ensure you have installed **mpv**, **VLC**, or **IINA**.-2. Verify it is in your system PATH by running `mpv --version` or `vlc --version` in your terminal.-3. If using a portable or non-standard installation, set the corresponding environment variable before running (e.g., `MOVIEBOX_MPV_PATH=/path/to/mpv`).--</details>--<details>-<summary><b>Images do not render / Only text is shown</b></summary>--MovieBox-TUI supports inline images via Kitty, Sixel, and iTerm2 protocols.--- If images don't show, ensure you are using a compatible terminal emulator (like Kitty, WezTerm, iTerm2, or Windows Terminal Preview).-- If your terminal does not support graphics, the UI gracefully falls back to text-based posters and remains fully usable.-- If you experience crashes when resizing the window (specifically with Sixel), please report it with your OS, terminal name, and version.--</details>--<details>-<summary><b>Termux: TUR install works, but `moviebox-tui` still points to `~/.cargo/bin`</b></summary>--This usually means you installed MovieBox-Tui with Cargo earlier and your shell-is still preferring the old Cargo path over the TUR package in `$PREFIX/bin`.--Check the installed TUR binary directly:--```bash-$PREFIX/bin/moviebox-tui --version-```--Then clear the shell command cache:--```bash-hash -r-```--If needed, move Termux's bin directory earlier in your shell startup file:+- **Interactive Help:** Press `?` inside the app anytime to view all keyboard shortcuts and mouse actions.+- **Mouse & Keyboard:** Full mouse navigation and keyboard controls are supported throughout the application.+- **Full Reference:** See [Controls & Shortcuts](docs/controls.md) for the complete list of keybindings and slash commands.-```bash-export PATH="$PREFIX/bin:$HOME/.cargo/bin:$PATH"-```+## Documentation-Then reload your shell and try `moviebox-tui` again.+All in-depth guides and technical details are available in the [`docs/`](docs/) directory:-</details>+- [Controls & Shortcuts](docs/controls.md) — Complete keyboard shortcuts, mouse actions, and slash commands+- [Architecture & Data Flow](docs/architecture.md) — How the app works under the hood+- [Media Players](docs/players.md) — Supported players, custom paths, and launch options+- [Downloads & Organization](docs/downloads.md) — Folder layout, batch downloading, and subtitles+- [Live TV & Playlists](docs/tv-mode.md) — How to add and manage custom M3U playlists+- [Configuration Reference](docs/config.md) — Config files and environment variables+- [Providers](docs/providers.md) — Supported content sources and protocols+- [Troubleshooting & Debugging](docs/debugging.md) — Fixing common issues and reporting bugs+- [Contributing Guide](CONTRIBUTING.md) — How to contribute code and submit PRs-<details>-<summary><b>"moviebox-tui: command not found" (Linux / macOS)</b></summary>+## Roadmap-If you installed via the script without `sudo`, the binary was placed in `~/.local/bin`. You need to add this to your PATH. Add this line to your `~/.bashrc` or `~/.zshrc`:+- [x] **Terminal UI (TUI):** Interactive terminal application with mouse and keyboard navigation, stream playback, and batch downloading.+- [ ] **Command-Line Interface (CLI):** Direct command-line flags and arguments for headless searching, streaming, and scripted downloading.+- [ ] **Desktop GUI Client:** Dedicated graphical desktop application powered by the same backend stream engine.-```bash-export PATH="$HOME/.local/bin:$PATH"-```+## Feedback & Support-Then restart your terminal.+MovieBox-TUI is an open-source project built for the community. If you enjoy using it, here are a few simple ways to help:-</details>+- **Star the repository** on GitHub to help more people discover it.+- **Share your thoughts** or report issues on the [GitHub Issues](https://github.com/mesamirh/MovieBox-Tui/issues) page.+- **Share the project** with friends or anyone who loves terminal tools.+- **Contribute** fixes or new features through [pull requests](CONTRIBUTING.md).<details>-<summary><b>Windows PowerShell script fails (Execution Policy)</b></summary>+<summary><b>Optional Support</b></summary>-If you receive an error about running scripts being disabled on your system when installing via PowerShell, run this command as Administrator first:--```powershell-Set-ExecutionPolicy RemoteSigned -Scope CurrentUser-```+If you would like to support ongoing development directly:-Then try the installation command again.+| Network / Asset | Address |+| :--- | :--- |+| **USDT (TRC20)** | `TL4yW73qmbKZpBWwbEFgjBpwVkPDFTkJgV` |+| **Bitcoin (BTC)** | `3MEAtqtRWrQBhnaMi3Zuf5nt2efNUS2LUQ` |+| **Ethereum / EVM** | `0x7ea20d5fa29d87f33195f5a3b211ff94038d794c` |+| **Solana (SOL)** | `6ctm5WFv73MNywoCKAz3xK72yizSspHa72rFNygooU6` |</details>-## Development--Formatting and linting are enforced automatically by the pre-commit hook on every-commit (see [CONTRIBUTING.md](CONTRIBUTING.md)). Before opening a PR, run the same-local checks the repository expects plus the CI-only verification steps:--```bash-cargo fmt --check-cargo clippy --all-targets --locked -- -D warnings-cargo check --locked-cargo audit-cargo package --locked-```--CI currently runs `cargo test --locked`, which passes today but covers no-meaningful unit tests yet. Keep the static gates above, plus the runtime checks-in [`docs/release-checklist.md`](docs/release-checklist.md), as the main release-bar until real regression coverage lands.--GitHub Actions also verifies cross-platform builds on Linux, macOS, and Windows,-and the release checklist still requires a real-device Termux/Android playback-verification before calling a release production-ready.--See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidance and-[`docs/release-checklist.md`](docs/release-checklist.md) for the runtime checks still-required before calling a release production-ready.-## LicenseLicensed under either [MIT](LICENSE-MIT) or [Apache-2.0](LICENSE-APACHE), at your option.-## Legal+## Disclaimer-MovieBox-TUI does not host media. It is not affiliated with any specific content sources, IPTV providers, player projects, or terminal vendors. Users are responsible for complying with laws and service terms applicable to them.+MovieBox-TUI does not host or store any media. It is an open-source tool for playing publicly available streams. Users are responsible for complying with the laws of their country.diff --git a/docs/README.md b/docs/README.mdindex 0d2be9c..e47e05d 100644--- a/docs/README.md+++ b/docs/README.md@@ -9,6 +9,7 @@ layout, runtime behavior, and operational workflows in prose tied to the source| Document | What it covers | Status || -------------------------------------------- | ------------------------------------------------------------------------------- | ------- || [architecture.md](architecture.md) | Crate/module map, event loop, async model, data flow | current |+| [controls.md](controls.md) | Keyboard shortcuts, mouse controls, and slash commands | current || [modules.md](modules.md) | Crate/module tree with responsibilities | current || [providers.md](providers.md) | MovieBox, 4KHDHub, BDIX protocols, signing, resolvers, errors | current || [players.md](players.md) | Player detection, mpv/VLC/IINA/AndroidIntent, headers, subtitles, window sizing | current |diff --git a/docs/controls.md b/docs/controls.mdnew file mode 100644index 0000000..1c99b42--- /dev/null+++ b/docs/controls.md@@ -0,0 +1,49 @@+# Controls & Shortcuts++MovieBox-TUI is designed for fast keyboard navigation with complete mouse support throughout the interface. You can also press `?` anywhere inside the application to open the interactive help dialog.++## Keyboard Shortcuts++| Key | Action |+| :--- | :--- |+| **Arrow keys** | Navigate search results, catalog shelves, seasons, episodes, and modal dialogs |+| **Enter** | Open or confirm the selected item |+| **Esc** | Go back, close popup dialog, or clear active input |+| **`d`** | Download the selected episode or full season |+| **`o`** | Open stream with a different media player |+| **`r`** | Refresh the current page or stream list |+| **`Ctrl+P`** | Switch content provider (MovieBox, 4KHDHub, BDIX, etc.) |+| **`Ctrl+T`** | Toggle live IPTV mode |+| **`?`** | Open interactive in-app help menu |+| **`Ctrl+C` / `q`** | Quit application and restore terminal |++## Mouse Controls++| Action | Result |+| :--- | :--- |+| **Click search bar** | Enter search input mode |+| **Click suggestion item** | Search for that suggestion immediately |+| **Click search result row** | Select item and load preview; click again to open full details |+| **Click audio / season / episode / stream** | Switch audio language, change season, select episode, or start playback |+| **Click footer buttons** | Switch provider (`[Ctrl+P]`), toggle TV (`[Ctrl+T]`), help (`[?]`), or quit (`[q]`) |+| **Click modal buttons** | Choose a theme, subtitles, player, or confirm downloads |+| **Click outside a modal** | Dismiss popup dialog |++## Slash Commands++Type these commands directly into the search bar:++| Command | Action |+| :--- | :--- |+| `/browse` | Browse curated popular, top-rated, and trending titles |+| `/download-dir` | View, change, or reset the download directory |+| `/history` | View watch history with latest progress per series |+| `/list` | View live TV channels (in TV mode) |+| `/config` | Manage custom IPTV playlists |+| `/theme` | Open theme picker (Mocha, Latte, Macchiato, Frappe, Nord, TokyoNight) |+| `/update` | Check if a new release is available |+| `/toggle-update` | Toggle automatic startup update checks |+| `/clear-cache` | Clear temporary cache files |+| `/enable-bdix` | Enable BDIX FTP sources (Bangladesh ISPs only) |+| `/disable-bdix` | Disable BDIX FTP sources |+| `/github` | Open the project repository |diff --git a/docs/cross-platform.md b/docs/cross-platform.mdindex cd35e71..162bd9b 100644--- a/docs/cross-platform.md+++ b/docs/cross-platform.md@@ -16,14 +16,14 @@ Supported: macOS, Linux, Windows, and Android (Termux). The codebase usesThe app probes the terminal at startup via `ratatui_image`:-- **Poster rendering**: High-resolution graphics via Sixel, Kitty, and iTerm2 protocols when supported by the terminal. Non-graphics terminals (e.g. standard Apple Terminal.app, basic xterm) gracefully display clean, aligned text placeholders (`Poster unavailable` / `No Art`) with zero block redraw artifacts. Image queries can be disabled via `MOVIEBOX_NO_IMAGE=1`.+- **Poster rendering**: High-resolution graphics via Sixel, Kitty, and iTerm2 protocols when supported by the terminal. Non-graphics terminals (for example Apple Terminal.app or basic xterm) display text placeholders (`Poster unavailable` / `No Art`). Image queries can be disabled via `MOVIEBOX_NO_IMAGE=1`.- **Terminal classification**: `TERM=dumb`/`linux` fall back to a basic UI.- Focus events (focus loss/gain) are used to re-render in place without clearing.## Network & TLS portability- **TLS Engine**: Uses pure-Rust `rustls` across all targets (macOS, Linux, Windows, Android/Termux), eliminating external C dependencies on OpenSSL.-- **DNS Resolution**: Uses standard POSIX/WinSock system DNS (`getaddrinfo`) on all platforms, ensuring reliable domain resolution in both standard OS environments and native Android/Termux CLI sessions without requiring JNI or `ndk-context`.+- **DNS Resolution**: Uses standard POSIX/WinSock system DNS (`getaddrinfo`) on all platforms, without requiring JNI or `ndk-context`.## Things to verify per releasediff --git a/docs/downloads.md b/docs/downloads.mdindex 460a0b1..ce63416 100644--- a/docs/downloads.md+++ b/docs/downloads.md@@ -25,15 +25,15 @@ 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 using `/download-dir <path>` or revert with `/download-dir reset`. Target directories are validated with active write probes before saving, consistently creating the organized `MovieBox-TUI` subfolder hierarchy (`Movies/` and `Series/`), and the engine automatically falls back to default if custom storage becomes unavailable at runtime.+- **Custom path:** Users can set a custom download directory using `/download-dir <path>` or revert with `/download-dir reset`. 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- **Contextual trigger**: Pressing `d` (or clicking `[Download]`) while focused on the **Seasons** pane prompts to download all episodes of the selected season. Triggering download while on the **Episodes** or **Streams** pane prompts to download only that single episode.-- **Duplication prevention**: When starting a download or processing a season batch queue, the engine checks if the target media file is already completed on disk. Existing completed episodes are automatically skipped to avoid duplicate downloads and bandwidth consumption.+- **Duplication prevention**: When starting a download or processing a season batch queue, the engine checks if the target media file is already completed on disk. Existing completed episodes are skipped.- A season download enqueues every episode (`download_queue`) and processes them one at a time, each resolving its stream and subtitle. Progress is reported through `Action::UpdateDownload` and the status bar; failures pause and preserve partial data.-Selected subtitle sidecars are saved next to the video using standard ISO 639-1 language codes (e.g. `.en.srt`, `.hi.srt`) and supported subtitle extensions (`.srt`, `.vtt`, `.ass`, `.ssa`, `.sub`) so media players and media servers identify the track language automatically.+Selected subtitle sidecars are saved next to the video using ISO 639-1 language codes (e.g. `.en.srt`, `.hi.srt`) and supported subtitle extensions (`.srt`, `.vtt`, `.ass`, `.ssa`, `.sub`).## Outcomesdiff --git a/docs/logging.md b/docs/logging.mdindex 2887cfa..d989687 100644--- a/docs/logging.md+++ b/docs/logging.md@@ -16,7 +16,7 @@ The active file is `moviebox-tui_rCURRENT.log`; rotated files are- **Level** is controlled by `MOVIEBOX_LOG` (`off|warn|info|debug|trace`). Default is`warn` in release builds, `info` in debug builds.-- **Rotation**: rotates at 5MB and keeps 3 files, so it stays small automatically.+- **Rotation**: rotates at 5MB and keeps 3 files.- **Terminal output**: normal log lines go only to the file without writing to stdout or stderr, preventing screen bleed before entering alternate screen mode. Setup errors (if any) are reported on `stderr`.- **Session header**: version, OS, and the log path are written on startup.- **Panics**: the panic hook logs the payload to the file, then restores the terminal.diff --git a/docs/players.md b/docs/players.mdindex d10ce38..a2b8c8c 100644--- a/docs/players.md+++ b/docs/players.md@@ -24,17 +24,18 @@ detected player and saves the chosen player as the next default unless| mpv | `mpv --autofit=WxH --geometry=50%:50% --idle=no --keep-open=no [--http-header-fields=..] [--sub-file=..] <url>` | Window sized to the terminal. Flatpak mpv is launched via `flatpak run`. || VLC | `vlc --width=W --height=H --play-and-exit [--http-referrer=..] [--http-user-agent=..] [--sub-file=..] <url>` | || IINA | `iina-cli --keep-running --no-stdin --mpv-autofit=.. --mpv-http-header-fields=.. --mpv-sub-files=.. <url>` | Uses the bundled `iina-cli`; falls back to `open -a IINA <url>` only if the CLI is absent. |-| Android / Proot | `termux-open --chooser --content-type video/* <url>` (or absolute `/system/bin/am start` fallback, ensuring `.so` injections are dropped) | Opens an app chooser on the device. Real-device chooser behavior should be confirmed for each release. |+| Android / Proot | `termux-open --chooser --content-type video/* <url>` (or absolute `/system/bin/am start` fallback, ensuring `.so` injections are dropped) | Opens an app chooser on the device. Device-specific chooser behavior should be confirmed for each release. |-Window size is derived from the live terminal size times the real font cell size-(reported by the image picker), clamped to a sane range.+Window size is derived from the live terminal size times the font cell size reported+by the image picker, then clamped to a fixed range.## Headers-Playback sources (e.g. 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) 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.## Subtitlesdiff --git a/docs/providers.md b/docs/providers.mdindex 7374b46..412d177 100644--- a/docs/providers.md+++ b/docs/providers.md@@ -48,7 +48,7 @@ which `app/playback.rs::launch_player` feeds to the external player.refuse real streaming) are rejected. The 4KHD referer and a browser user-agent areattached so referer-gated CDNs stream in the player too.- `hubcloud.rs` resolves hubcloud/hubdrive pages into candidate playable links and- picks the best mirror by score.+ selects a mirror by score.- **Multilingual audio detection**: `parser.rs::detect_language` parses release titles andmetadata for 30+ regional and international languages (Hindi, Tamil, Telugu, Kannada,Malayalam, Bengali, Marathi, Punjabi, Gujarati, Urdu, Japanese, Korean, Chinese, Spanish,diff --git a/docs/tv-mode.md b/docs/tv-mode.mdindex b14cb00..b310c3c 100644--- a/docs/tv-mode.md+++ b/docs/tv-mode.md@@ -1,13 +1,12 @@# TV Mode-TV mode streams live channels from **your own** M3U playlists — there is no bundled-third-party feed. You add playlists by URL or local file path, and the app parses,-groups, dedupes and lets you search and play them.+TV mode streams live channels from M3U playlists. You add playlists by URL or local+file path, and the app parses, groups, dedupes, and lets you search and play them.## Entering TV mode- `Ctrl+T` toggles Streaming / TV mode.-- On first entry with no playlists, the playlist manager opens automatically.+- On first entry with no playlists, the playlist manager opens.- While in TV mode, type to filter channels by name or group, `Enter` to play,`/list` for all channels, `/config` to manage playlists, `[r]` to reload.