Skip to content

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

style: reformat documentation tables and clean up CI/CD workflow syntax

Samir Hossains1bded69b6546
diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml
index 6e2e0be..487181f 100644
--- a/.github/workflows/homebrew.yml
+++ b/.github/workflows/homebrew.yml
@@ -8,7 +8,7 @@ on:
workflow_dispatch:
inputs:
tag:
- description: 'Release tag to mirror into Homebrew (e.g. v0.1.11)'
+ description: "Release tag to mirror into Homebrew (e.g. v0.1.11)"
required: true
jobs:
@@ -45,7 +45,7 @@ jobs:
fi
echo "version=$CLEAN_VERSION" >> $GITHUB_OUTPUT
echo "tag=$VERSION" >> $GITHUB_OUTPUT
-
+
BASE_URL="https://github.com/${{ github.repository }}/releases/download/$VERSION"
curl -fsSL "$BASE_URL/MovieBox_macOS_Universal.tar.gz" -o macos.tar.gz
curl -fsSL "$BASE_URL/MovieBox_Linux_x64.tar.gz" -o linux-x64.tar.gz
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index fadc40f..1ad5d89 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -8,7 +8,7 @@ on:
workflow_dispatch:
inputs:
tag:
- description: 'Release tag to publish (e.g. v0.1.11)'
+ description: "Release tag to publish (e.g. v0.1.11)"
required: true
jobs:
@@ -39,12 +39,12 @@ jobs:
echo "Cargo.toml version v$VERSION does not match requested tag ${{ github.event.inputs.tag }}"
exit 1
fi
-
+
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.90.0
-
+
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 35d5582..fd5895e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -25,7 +25,7 @@ jobs:
run: |
VERSION=$(grep '^version =' Cargo.toml | head -1 | awk -F'"' '{print $2}')
echo "version=$VERSION" >> $GITHUB_OUTPUT
-
+
if gh release view "v$VERSION" &>/dev/null; then
echo "is_new=false" >> $GITHUB_OUTPUT
echo "Release v$VERSION already exists. Skipping build."
@@ -108,7 +108,7 @@ jobs:
cp target/${{ matrix.target }}/release/moviebox-tui dist/
cp README.md dist/
cp LICENSE-* dist/ || true
-
+
if [ "${{ matrix.target }}" == "x86_64-unknown-linux-musl" ]; then
tar -czvf MovieBox_Linux_x64.tar.gz -C dist .
elif [ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]; then
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2c9b98f..4e3c17e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -31,6 +31,7 @@ The app is message-driven and organized into focused modules. Full maps live in
[`docs/architecture.md`](docs/architecture.md) and [`docs/modules.md`](docs/modules.md).
Short version:
+
- `src/tui/app/`: The application object (`App`). `run.rs` holds the thin
`handle_action` dispatcher that routes every `Action` to a `handle_*` method in its
module (`run.rs`, `requests.rs`, `playback.rs`, `download.rs`, `navigation.rs`,
@@ -72,6 +73,7 @@ For release readiness, static checks are not enough on their own. Before declari
release production-ready, work through [`docs/release-checklist.md`](docs/release-checklist.md).
**Guidelines:**
+
- Follow idiomatic Rust and standard `rustfmt` defaults. Don't hand-format.
- Keep the async, message-passing architecture intact.
- Avoid panics on paths that handle network or user input.
@@ -82,6 +84,7 @@ release production-ready, work through [`docs/release-checklist.md`](docs/releas
Follow [Conventional Commits](https://www.conventionalcommits.org/). Keep the subject concise and in the imperative mood.
Examples:
+
- `feat: add support for custom mpv arguments`
- `fix: prevent panic when clipboard is unavailable`
- `docs: document /anime discover command`
diff --git a/README.md b/README.md
index ec74a58..4159c5a 100644
--- a/README.md
+++ b/README.md
@@ -117,8 +117,9 @@ 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.*
+
+_`termux-setup-storage` is recommended if you want downloads saved to the real
+Android `Download` folder._
<details>
<summary><b>Build from source</b></summary>
diff --git a/docs/README.md b/docs/README.md
index 5da7c6a..0d2be9c 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -6,21 +6,21 @@ layout, runtime behavior, and operational workflows in prose tied to the source
## Index
-| Document | What it covers | Status |
-|---|---|---|
-| [architecture.md](architecture.md) | Crate/module map, event loop, async model, data flow | 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 |
-| [cache.md](cache.md) | Cache layout, namespaces, TTLs, atomic writes, purge | current |
-| [logging.md](logging.md) | File logging, `MOVIEBOX_LOG`, rotation, sanitization, sharing logs | current |
-| [tv-mode.md](tv-mode.md) | User-owned M3U playlists, manager, search, playback, config | current |
-| [config.md](config.md) | `config.json` fields and `MOVIEBOX_*` environment variables | current |
-| [downloads.md](downloads.md) | Download engine: resume, ranges, segments, retry, cancel | current |
-| [cross-platform.md](cross-platform.md) | OS support, terminal protocols, Termux, focus handling | current |
-| [release-checklist.md](release-checklist.md) | Static gates plus required real-environment release verification | current |
-| [debugging.md](debugging.md) | Reproducing issues and what to include in GitHub reports | current |
-| [known-issues.md](known-issues.md) | Known limitations and how they are tracked | current |
+| Document | What it covers | Status |
+| -------------------------------------------- | ------------------------------------------------------------------------------- | ------- |
+| [architecture.md](architecture.md) | Crate/module map, event loop, async model, data flow | 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 |
+| [cache.md](cache.md) | Cache layout, namespaces, TTLs, atomic writes, purge | current |
+| [logging.md](logging.md) | File logging, `MOVIEBOX_LOG`, rotation, sanitization, sharing logs | current |
+| [tv-mode.md](tv-mode.md) | User-owned M3U playlists, manager, search, playback, config | current |
+| [config.md](config.md) | `config.json` fields and `MOVIEBOX_*` environment variables | current |
+| [downloads.md](downloads.md) | Download engine: resume, ranges, segments, retry, cancel | current |
+| [cross-platform.md](cross-platform.md) | OS support, terminal protocols, Termux, focus handling | current |
+| [release-checklist.md](release-checklist.md) | Static gates plus required real-environment release verification | current |
+| [debugging.md](debugging.md) | Reproducing issues and what to include in GitHub reports | current |
+| [known-issues.md](known-issues.md) | Known limitations and how they are tracked | current |
> Contribution guidance lives in the repository-root `CONTRIBUTING.md` (the canonical
> doc GitHub surfaces for PRs), not in this folder.
diff --git a/docs/config.md b/docs/config.md
index 61c2cb0..81fbb1a 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -5,14 +5,14 @@
Written atomically under the config directory (`dirs::config_dir()/moviebox-tui/`;
macOS `~/Library/Application Support/moviebox-tui`, Linux `~/.config/moviebox-tui`).
-| Field | Type | Meaning |
-|---|---|---|
-| `auto_update` | bool | Check for updates on startup (max once/hour). |
-| `last_update_check` | u64 | Epoch seconds of the last update check. |
-| `active_provider` | string | Last provider (`moviebox`, `fourkhdhub`, …). |
-| `active_theme` | string | Theme name. |
-| `bdix_enabled` | bool | Show BDIX providers (Bangladesh-only). |
-| `default_player` | string or null | Preferred player: `mpv`, `iina`, `vlc`, `android`; absent/null until you choose one from the in-app picker. |
+| Field | Type | Meaning |
+| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------------- |
+| `auto_update` | bool | Check for updates on startup (max once/hour). |
+| `last_update_check` | u64 | Epoch seconds of the last update check. |
+| `active_provider` | string | Last provider (`moviebox`, `fourkhdhub`, …). |
+| `active_theme` | string | Theme name. |
+| `bdix_enabled` | bool | Show BDIX providers (Bangladesh-only). |
+| `default_player` | string or null | Preferred player: `mpv`, `iina`, `vlc`, `android`; absent/null until you choose one from the in-app picker. |
## Other persisted files
@@ -22,15 +22,15 @@ macOS `~/Library/Application Support/moviebox-tui`, Linux `~/.config/moviebox-tu
## Environment variables
-| Variable | Purpose |
-|---|---|
-| `MOVIEBOX_LOG` | Log level: `off`, `warn`, `info`, `debug`, `trace`. See [logging.md](logging.md). |
-| `MOVIEBOX_PLAYER` | Preferred player (overrides `default_player`). |
-| `MOVIEBOX_MPV_PATH` | Custom mpv executable. |
-| `MOVIEBOX_VLC_PATH` | Custom VLC executable. |
-| `MOVIEBOX_IINA_PATH` | Custom IINA/iina-cli executable. |
-| `MOVIEBOX_FOURKHDHUB_URL` | Override the 4KHDHub base URL. |
-| `MOVIEBOX_THEME` | Force a theme (e.g. `Mocha`, `Latte`). |
+| Variable | Purpose |
+| ------------------------- | --------------------------------------------------------------------------------- |
+| `MOVIEBOX_LOG` | Log level: `off`, `warn`, `info`, `debug`, `trace`. See [logging.md](logging.md). |
+| `MOVIEBOX_PLAYER` | Preferred player (overrides `default_player`). |
+| `MOVIEBOX_MPV_PATH` | Custom mpv executable. |
+| `MOVIEBOX_VLC_PATH` | Custom VLC executable. |
+| `MOVIEBOX_IINA_PATH` | Custom IINA/iina-cli executable. |
+| `MOVIEBOX_FOURKHDHUB_URL` | Override the 4KHDHub base URL. |
+| `MOVIEBOX_THEME` | Force a theme (e.g. `Mocha`, `Latte`). |
## CLI
diff --git a/docs/cross-platform.md b/docs/cross-platform.md
index 3df3370..6a8e158 100644
--- a/docs/cross-platform.md
+++ b/docs/cross-platform.md
@@ -5,11 +5,11 @@ Supported: macOS, Linux, Windows, and Android (Termux). The codebase uses
## OS notes
-| Platform | Notes |
-|---|---|
-| macOS | IINA preferred player (via bundled `iina-cli`); VLC/mpv `.app` paths detected. `process_group(0)` on spawn. |
-| Windows | mpv/VLC detected via Program Files + `%LOCALAPPDATA%`; players spawned with `CREATE_NO_WINDOW`; path-safe file stems. |
-| Linux | Flatpak mpv/VLC supported (`flatpak run …`); xdg data/cache dirs. |
+| Platform | Notes |
+| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| macOS | IINA preferred player (via bundled `iina-cli`); VLC/mpv `.app` paths detected. `process_group(0)` on spawn. |
+| Windows | mpv/VLC detected via Program Files + `%LOCALAPPDATA%`; players spawned with `CREATE_NO_WINDOW`; path-safe file stems. |
+| Linux | Flatpak mpv/VLC supported (`flatpak run …`); xdg data/cache dirs. |
| Android (Termux) | Dynamic filesystem checks for `/system/bin/am` or `termux-open`; playback strips `LD_LIBRARY_PATH` and `LD_PRELOAD` before launching the chooser. Real-device chooser behavior should be confirmed separately from the desktop release pipeline; Proot/Termux X11 behavior is environment-dependent. |
## Terminal capabilities
diff --git a/docs/players.md b/docs/players.md
index 2c231ce..d10ce38 100644
--- a/docs/players.md
+++ b/docs/players.md
@@ -19,11 +19,11 @@ detected player and saves the chosen player as the next default unless
## Command construction
-| Player | Invocation | Notes |
-|---|---|---|
-| 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. |
+| Player | Invocation | Notes |
+| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
+| 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. |
Window size is derived from the live terminal size times the real font cell size
diff --git a/docs/providers.md b/docs/providers.md
index 519328c..a7edee1 100644
--- a/docs/providers.md
+++ b/docs/providers.md
@@ -6,12 +6,12 @@ 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. |
+| 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. |
BDIX sources are only reachable from supported Bangladeshi ISPs and are hidden by
default (`bdix_enabled` in config; `/enable-bdix`).