github mesamirh/MovieBox-Tui v0.1.16

latest releases: v0.1.26, v0.1.25, v0.1.24...
one month ago

Added

  • Home Landing Deck Continue Watching & Multi-Tab Navigation:
    • Implemented interactive multi-tab landing deck on the Home screen supporting both Continue Watching and Favorites.
    • Added seamless Tab and Shift+Tab keyboard cycling between Continue Watching and Favorites tabs with instant row focus retention.
    • Added one-click/key direct resume (Enter, Space, or P) on Continue Watching items, automatically configuring episode advancement, season positioning, and auto-play in Details view.
    • Formatted Continue Watching rows with title truncation, series episode badge (S01E03), progress percentage, and remaining duration (45% · 24m left).
    • Added mouse support for clicking the landing deck header bar to switch tabs, and double-clicking items to play/open.
  • Windows TrueColor & High-Contrast Terminal Theming:
    • Enabled 24-bit TrueColor auto-detection by default on Windows 10/11 (conhost.exe, Windows Terminal, PowerShell, CMD), ensuring Windows users receive rich Catppuccin themes out of the box.
    • Overhauled 16-color ANSI dark fallback palette (Theme::fallback), replacing low-contrast dark blue and magenta with high-contrast cyan accents for borders, titles, headers, and highlights.
    • Added background row selection suppression in Settings Hub when modal popups (media player picker, theme picker, download directory input) are active, directing 100% of user focus to floating dialogs.
    • Clamped popup picker minimum height to 7 rows, eliminating visual crowding on single-item selections.
    • Elevated active selection surface styling to theme.surface1 with accent-highlighted cursor indicators (▌ / ▸ ) across lists and settings rows.
  • In-App Self-Update Engine Hardening:
    • Added deterministic fallback download URL generation for GitHub release assets and SHA256SUMS when unauthenticated API requests encounter HTTP 403 rate limits.
    • Added active in-flight self-update progress modal (draw_updating_modal) featuring animated Braille spinners, version upgrade indicators (v{old} → v{new}), and real-time status steps.
    • Added environment-aware update modal actions: displays Homebrew upgrade instructions (brew upgrade moviebox-tui) with [b] shortcut on Homebrew installations, Termux installer guidance on Android, and package manager notifications on read-only installations.
    • Added 5-iteration retry loop with bounded 1-second backoff in the Windows update helper script (moviebox_update_helper.bat) to tolerate transient file locks from antivirus or Windows search indexers during binary replacement.
    • Cached full Release metadata in AppState and action pipeline, eliminating duplicate network queries between release checking and self-update invocation.
  • Empirical Performance Standards & Benchmark Testing Guidelines:
    • Added strict performance verification standards requiring empirical before-and-after measurements (runtime latency, allocations, frame render latency, I/O syscalls, binary footprint) across hot paths.
    • Documented standardized performance benchmark reporting format in docs/testing.md for reproducible optimization audits.
  • Centralized Poster Placeholder & UI Animation Widgets:
    • Extracted reusable render_poster_placeholder widget to src/tui/widgets/poster.rs, standardizing placeholder containers, loading dots, and geometry clamping across Home and Details screens.
    • Centralized loading_spinner in src/tui/widgets, providing uniform ASCII fallback (.., ...) on basic terminals and animated Braille frames on modern terminals.
    • Added zero-allocation cursor helpers (cursor_prefix_str, cursor_column_offset, cursor_split_parts) to TextInputBuffer, replacing dynamic vector and string allocations with zero-copy slices during typing and cursor blinking.
    • Added step_list_selection to src/tui/state.rs, centralizing bounds-safe list stepping for PageUp and PageDown navigation across browse, theme, and favorites lists.
    • Added clear_poster_cache and clear_poster_protocols to AppState, guaranteeing consistent flushing of in-flight requests, LRU image handles, and terminal protocols across provider switches and search resets.

Removed

  • Poster Graphics Configuration & Halfblocks Engine:
    • Removed Unicode Halfblocks poster engine (▀/▄), eliminating low-resolution cell distortion, font scanlines, and terminal redraw lag during list scrolling.
    • Removed redundant Poster Graphics toggle from Settings Hub (/settings $\to$ Appearance) and config.json, delegating terminal graphics strictly to automatic native GPU protocol detection (Kitty, Sixel, iTerm2).

Fixed

  • Cross-Platform Handle Safety & Silent Failure Elimination:
    • Fixed Windows file sharing violation (ERROR_SHARING_VIOLATION) in multi-segment download assembly by explicitly flushing, syncing, and dropping the file write handle before executing destination renames.
    • Added overwrite handling on destination collisions during download finalization on Windows, preventing failed renames on re-downloaded media.
    • Guarded FavoritesManager::load_from_path against premature corrupt file rotation on transient read errors, matching history and configuration persistence invariants.
    • Hardened Lua tracker script and state file directory initialization to return None on directory creation or write failures rather than passing non-existent paths to media players.
    • Handled web browser launch failures in Settings Hub (open::that), logging warnings and displaying the repository URL on headless or restricted environments.
    • Added CREATE_NO_WINDOW flag (0x08000000) to the Windows update helper process spawn to eliminate console window flashes during in-app updates.
  • Resilient Cross-Platform Cache Clearing & In-Flight Task Isolation:
    • Hardened clear_all_cache with recursive directory contents deletion, leaving the root directory node intact to prevent ERROR_ACCESS_DENIED and ERROR_SHARING_VIOLATION failures when Windows processes or shells hold folder handles.
    • Added Windows read-only attribute clearing before unlinking locked files.
    • Included external Android subtitle cache directory (~/storage/downloads/moviebox_subs) and temporary system subtitle caches in the cache purge sequence.
    • Connected Action::ClearCache directly to self.request_tasks.cancel_all() and added cancellation guards in spawn_search_posters, preventing in-flight background requests from writing stale responses or posters immediately after cache clearance.
    • Propagated concrete filesystem Result<(), String> to Action::CacheCleared, replacing hardcoded success notifications with real error reporting.
  • Unified Search Result Selection Background:
    • Unified search result card selection highlight across the entire item slot (item_area), eliminating fragmented background rendering between cursor indicators, posters, and text columns.
    • Removed redundant poster sub-area buffer clearing before image rendering, preventing selection background clipping and black gutter artifacts on the right edge of posters.
  • High-Precision Playback Tracking & Race Elimination:
    • Eliminated wall-clock race condition where process elapsed time overwrote exact seek/pause positions from mpv and iina-cli Lua trackers.
    • Hardened moviebox_tracker.lua with latched completion: reaching $\ge 90%$ playback or EOF permanently latches completion, preventing shutdown events from reverting completed status.
    • Implemented atomic state file persistence in Lua using temporary files (.tmp) and clean destination replacement for Windows and Unix platforms.
    • Handled unknown stream durations by writing JSON null, preventing zero-duration calculations.
    • Pre-registered media playback on launch (record_start), ensuring immediate watch history persistence for Android intent dispatchers (termux-open, am start) and app fallbacks.
    • Added self-healing recovery in reconcile_from_dir: pre-seeded pending state files carry metadata (title, cover_url, stype, release_year), restoring new items into watch history even after sudden terminal exits or reboots.
    • Implemented smart series episode advancement: completing an episode automatically cues the next episode (episode + 1 or next season) on resume (Space/P) and in the Details view.
  • Details View Empty Stream Source Label Geometry:
    • Replaced verbose empty stream message with a compact string (No stream sources found on {provider} (Ctrl+P to switch provider, r to retry)), preventing awkward multi-line text wrapping on standard 80-column terminals.
  • Standardized 'No Art' Poster Containers Across Terminals:
    • Replaced robot eyes and broken infinite loading spinners with clean, static, centered No Art bordered blocks across search results and details screens on terminals without graphics support.
    • Preserved full-fidelity native GPU graphics rendering on supported terminals while standardizing card geometry and poster container boundaries across all platforms.
    • Gated background poster network requests and CPU image decoding strictly behind image_supported, eliminating redundant network bandwidth and CPU cycles on standard terminals.

Changed

  • Provider Switching Shortcut:

    • Scoped Ctrl+P strictly to Streaming Mode for provider cycling, eliminating redundant Ctrl+P handling in TV and Addon modes.
    • Streamlined /config as a direct alias for /settings.
  • Pruned Redundant Theme Slash Command:

    • Removed standalone /theme slash command, parser routing, and auto-suggestions; theme selection and visual palette swatches are managed directly within the interactive Settings Hub (/settings $\to$ Appearance $\to$ Theme).
  • Discover Categories Landing Card UX:

  • Clean Segmented Landing Deck Header Styling:

    • Replaced crowded decorative star (★) and bracket ([ ]) glyphs with a clean, segmented tab bar header (Continue Watching │ Favorites (Tab)).
    • Streamlined overflow row formatting to centered minimalist pill indicators (+N more · /history and +N more · /favorites).
    • Streamlined Discover & Quick Categories card: elevated /browse command to a right-aligned header badge ([ /browse ]), eliminated redundant /browse · row prefixes, and adapted category rows dynamically between Streaming and Addon modes.
    • Added direct mouse click navigation to discover categories, routing clicks to preset browse queries or the addon catalog menu.
  • Command Dispatch & Cache Lookup Optimization:

    • Unified ParsedCommand and SlashCommand into a single canonical enum, eliminating duplicate type definitions across command dispatch and testing.
    • Streamlined image disk cache lookups (get_namespaced_image_cache), eliminating 6-iteration fallback namespace scans across unrelated provider directories on cache misses.
    • Replaced duplicate is_termux_env in player module with crate::updater::artifact::is_termux_environment.
  • Automation Workflows & Installer Hardening:

    • Added bounded execution timeouts (timeout-minutes) across all CI and release pipeline jobs to prevent runner hangs.
    • Accelerated release preflight by eliminating redundant cross-compilation target toolchain downloads during source packaging.
    • Streamlined Homebrew formula updater (homebrew.yml) by parsing the release's attested SHA256SUMS manifest directly with strict 64-char hex validation, eliminating redundant ~50MB archive downloads.
    • Added on-device binary execution smoke tests to install.ps1 and enhanced install.sh error diagnostics with API version resolution fallbacks.
  • Documentation & User Guide Streamlining:

    • Overhauled root README.md into a developer-focused technical guide, pruning marketing copy, redundant comparison tables, and promotional buzzwords.
    • Added structured media player setup guide with package manager commands (brew, apt, winget).
    • Updated macOS Homebrew installation with explicit brew trust step required by Homebrew 6.0+ for third-party taps.
    • Streamlined quickstart section to reference in-app interactive help (?) and docs/controls.md, preventing documentation drift.
  • Streamlined Test Architecture & High-Signal Test Suite:

    • Consolidated unit assertions for file stem sanitization, MD5 hashing, atomic writing, and badge rendering directly into their respective modules (src/download.rs, src/cache.rs, src/tui/widgets/badge.rs).
    • Pruned 10 redundant, weightless, and duplicate test suites (player_integration.rs, url_security.rs, download_integration.rs, m3u_integration.rs, cache_lifecycle.rs, real_acceptance.rs, grand_user_journey.rs, history_reconciliation.rs, version_upgrade_e2e.rs), reducing integration test files from 20 to 9 focused suites while preserving complete regression coverage.
    • Hardened .omp/AGENTS.md and docs/testing.md with strict engineering rules rejecting weightless tests, duplicate test layers, and monolithic multi-phase journey tests.
    • Aligned update modal keyboard tests with modal input isolation, verifying keystrokes do not fall through to background search results while the dialog is active.

Fixed

  • Responsive Text Sizing & Layout Truncation:

    • Raised Details footer split threshold (DETAILS_FOOTER_SPLIT_THRESHOLD) to 106 columns, ensuring shortcuts use a clean 2-row layout on terminals between 80 and 105 columns without clipping.
    • Omitted [Ctrl+P] Provider hint from the Details footer when in Addon mode or viewing addon streams, recovering 18 columns of footer space.
    • Added line-width budgeting to Details metadata: audios and extra metadata (Genre, Director, Cast) now dynamically truncate to available row width without wrapping beyond their allocated lines.
    • Synchronized Settings tab hit-testing (category_tab_rects) with compact rendering (popup_area.width < 58), resolving mouse click target divergence on compact terminals.
    • Added dynamic subtext and label truncation in Settings rows, preventing 2-row Paragraph wrapping and off-screen line displacement.
    • Replaced hardcoded path truncation in Settings download directory with dynamic middle truncation (truncate_middle_width), maximizing displayed path length while fitting compact rows.
    • Added dynamic description truncation to Home discover categories card, preventing overflow on narrow (50–54 col) screens.
    • Added responsive compact labels ([Try Provider (P)] and [Clear (c)]) and narrowed separation to No-Results buttons when terminal width is under 56 columns.
    • Removed obsolete Ctrl+P hint from search bar mode pill in Addon mode, replacing it with [Addon Mode].
    • Added available width clamping to non-landing search bar placeholders and status messages to prevent 1-row Paragraph wrapping.
    • Omitted redundant media type separator in search results metadata when terminal width is under 36 columns and release year is present, keeping provider badges intact.
    • Budgeted list entry lengths in TV Playlists and Addon Manager popups to fit within inner popup bounds regardless of installed badge counts.
    • Raised Help menu two-column threshold to 102 columns to prevent keybinding description truncation.
    • Added compact title formatting to download gauge when width is under 60 columns.
    • Added compact button formatting ([u] Update [o] Web [Esc] Back) to Update Modal on terminals under 60 columns.
    • Added compact header formatting to Updating progress modal when inner width is under 42 columns.
    • Added title boundary protection to ModalFrame, truncating overly long titles to preserve border integrity.
    • Eliminated dark rectangular halo artifact around modal popups by removing block-level background color overrides from ModalFrame, allowing rounded borders to cleanly render against transparent and custom terminal backgrounds without pixel spillage.
  • Resilient Configuration & Accurate Metadata:

    • Safeguarded user TV playlists (tv_config.json) and HTTP addons (addons_config.json): replaced destructive error-swallowing deletion with timestamped .corrupt.{timestamp} file rotation and sanitized logging on JSON parse failures.
    • Eliminated fabricated S01E01 fallback in addon metadata adapter, accurately reporting empty series episodes when an upstream catalog entry lacks episode records instead of injecting unplayable dummy data.
  • Discover Card Layout & Truncation:

    • Fixed horizontal text clipping on discover card category descriptions by adjusting margins_len to account for visual pointer and margin cell budgets.
    • Suppressed discover card rendering while search suggestions dropdown is open, preventing visual overlap.
  • Update Modal Input Isolation & Event Guards:

    • Prevented keystroke hijacking: deferred blocking update modal presentation while the user is actively typing in the search bar (InputMode::Editing), ensuring keys (u, o, Esc) never trigger unintended update actions.
    • Added input lock during in-flight updates (is_updating), consuming all keyboard and mouse events to prevent mid-upgrade process termination or disk corruption.
  • Comprehensive Multi-Platform Player Detection & Dynamic Settings Refresh:

    • Expanded Windows MPV and VLC candidate discovery across executable-adjacent directories (.\mpv.exe, .\vlc.exe), WinGet Packages (%LOCALAPPDATA%\Microsoft\WinGet\Packages), user Downloads and Desktop extractions, mpv.net (mpvnet.exe, mpv.net), mpv.com, Scoop apps and shims, Chocolatey, portable drive roots (C:\mpv, C:\vlc, C:\tools), and Windows Registry App Paths and Environment\Path.
    • Expanded macOS and Linux discovery across Nix profiles (~/.nix-profile/bin, /run/current-system/sw/bin), Homebrew, MacPorts, user .local/bin, and user/system Flatpak exports.
    • Replaced permanent negative caching (OnceLock<Option<String>>) with non-negative path caching across MPV, VLC, IINA, and Android Intent openers, ensuring players installed after cold start are discovered immediately.
    • Added non-destructive dynamic player detection merging to Settings Hub (ToggleSettingsPopup, ShowSettingsPopup), player selection activation, and value cycling, refreshing available_players in real time without requiring an app restart.
  • Direct Playback & Header Compatibility:

    • Eliminated vestigial in-stream "Open with" popup that blocked playback when only VLC was installed, routing playback directly to the preferred compatible player.
    • Prevented silent player overrides: when a user explicitly selects a default player (e.g. VLC) that cannot satisfy stream authentication headers (e.g. MovieBox signed DASH manifests), the app now halts playback and warns the user with actionable detected alternatives instead of silently launching an unselected player.
    • Added structured PlaybackResolution engine with dynamic context-aware notifications across playback resolution and download operations.
  • Terminal Graphics Probe Leak:

    • Prevented raw Kitty APC escape sequence leak (Gi=31...) on macOS Terminal.app and legacy non-graphics consoles by skipping graphics stdio probes.
    • Removed unsafe mid-session stdio graphics re-probing on FocusChange events.
  • High-Performance Player Detection Engine (src/player.rs):

    • Centralized OS executable probing (mpv, vlc, IINA) into a single probe_player_executable engine, stripping ~150 lines of duplicate path traversal.
    • Added static caching (OnceLock) to IINA resolution and Android Termux Intent detection, eliminating repeated expensive filesystem IO and PATH lookups during playback launches.
    • Expanded candidate resolution: added macOS MacPorts (/opt/local/bin/*) and standard /bin/* locations.
    • Aligned installer (install.sh, install.ps1) player detection with the app engine, explicitly probing standard /Applications/*.app and C:\Program Files deployments so GUI installations are correctly discovered immediately post-install.
  • Responsive Mobile Installer Headers (install.sh & install.ps1):

    • Implemented dynamic terminal column detection (tput cols, stty size, and $COLUMNS in install.sh; $Host.UI.RawUI.WindowSize.Width in install.ps1) with automatic multi-tier banner sizing.
    • Eliminated ASCII art banner wrapping and visual corruption on narrow mobile viewports (e.g. Android Termux portrait mode at 40–55 columns) by rendering an adaptive 31-column compact half-block banner (█▀▄▀█...) and dynamic horizontal centering.
  • Android Termux Static-PIE & TLS Alignment:

    • Linked aarch64-unknown-linux-musl target as static-PIE (-C relocation-model=pic -C link-arg=-pie) to produce ET_DYN (ELF e_type: 0x0003) binaries accepted by Android Bionic's /system/bin/linker64, resolving runtime failure (unexpected e_type: 2).
    • Added 64-byte PT_TLS alignment anchor in src/main.rs and post-build ELF program header alignment in .github/workflows/release.yml to satisfy Android Bionic's ARM64 TLS segment minimum alignment validation.
    • Added automated ELF e_type and PT_TLS validation checks to .github/workflows/release.yml and a post-installation execution smoke test to install.sh.

Removed

  • Pruned unused legacy type aliases (SeasonInfo, EpisodeInfo, StreamResource, StreamMirror) in src/models.rs.
  • Removed dead util_row struct field from LandingRows in src/tui/screens/home.rs.
  • Removed vestigial ShowPlaybackPicker and ShowPlayerPicker action variants and playback picker state fields in favor of direct compatible player dispatch.
  • Removed unreferenced static screenshot assets (assets/), reducing repository clone size by ~1.3MB.
  • Redundant Slash Commands:
    • Pruned 10+ legacy slash commands (/download-dir, /clear-cache, /update, /github, /probe, /toggle-update, /toggle-bdix, /toggle-streaming, /toggle-tv, /toggle-addons, /enable-*, /disable-*) superseded by the interactive Settings Hub.
    • Removed 300+ lines of redundant command execution and file write probing in src/tui/app/search.rs.
    • Removed duplicate unreachable Ctrl+U key handling in src/tui/app/keyboard.rs.

Don't miss a new MovieBox-Tui release

NewReleases is sending notifications on new releases.