Fixed
- Search Navigation & Pagination Engine:
- Gated background search pagination in
src/tui/app/navigation.rsso arrow navigation on result sets smaller than the visible viewport never triggers background page fetches. - Added
search_exhaustedtracking insrc/tui/state.rsandsrc/tui/app/requests.rs, stopping pagination crawls when provider search returns fewer than 15 items or zero query-matching results. - Preserved stable card slot positions during search pagination in
src/tui/app/requests.rsby appending subsequent page items to the list rather than re-sorting the entire array out from under the cursor. - Removed redundant "Provider: {name}" status message override from the search bar on provider switch in
src/tui/app/navigation.rs, preserving the clean search placeholder while the active provider pill displays on the right.
- Gated background search pagination in
- Media Playback & Buffering Engine:
- Prioritized native desktop media players (
mpv,VLC) over Android intent openers insrc/player.rswhen an active X11/Wayland display server ($DISPLAY,$WAYLAND_DISPLAY) is detected, preventing Ubuntu Xfce (udroid/PRoot) and Termux:X11 desktop sessions from dispatching playback to external Android app choosers. - Routed DASH
.mpdstreams through the localStreamRelayproxy (src/proxy.rs,src/tui/app/playback.rs) across all media players (mpv,IINA,VLC,AndroidIntent), caching rewritten.mpdmanifests in RAM, warm-prefetching initialization and opening segments on sidecar startup, fetching.m4ssegments via concurrent95 KBHTTPRangesub-requests (0.286sper segment vs3.120s), and prefetching both the next 3 video segments (N+1..N+3) and synchronized audio segments (chunk-stream3-N..N+1). - Tuned
mpvandIINAplayback flags (--hwdec=auto-safe,--stream-buffer-size=4M,--cache-secs=120,--cache-pause-wait=3,--cache-pause-initial=no, and--ytdl=noon non-DASH direct streams) insrc/player.rs, reducing 1080p cold-seek latency at01:00:00from11.96sto3.87sand boosting read-ahead buffer fill rate from1 MB(9.3s) to7 MB(53s). - Replaced aggressive VLC buffering flags (
--network-caching=10000,--adaptive-logic=nearoptimal) with--network-caching=3000,--file-caching=3000,--http-reconnect, and--adaptive-logic=predictiveinsrc/player.rsto stop demuxer stream restarts and reconnect cleanly on dropped HTTP streams. - Enforced
max_heightresolution limits in the loopback stream proxy manifest rewriter (src/proxy.rs,src/main.rs,src/tui/app/playback.rs), pruning representations exceeding the chosen ceiling so Android players and VLC respect 480p and 720p selections. - Parsed signed expiration timestamps (
:t=) from MovieBoxEdge-Cache-Cookieheaders insrc/cache.rsalongside CloudFront policies, automatically invalidating stale stream cache entries within 60 seconds of expiration to prevent HTTP 403 playback crashes. - Persisted selected stream filenames (
stream_filename) in watch history (src/history.rs,src/player/tracker.rs,src/tui/app/playback.rs) and auto-focused matching stream rows on load (src/tui/app/requests.rs,src/tui/app/system.rs), restoring the user's previously chosen quality mirror when resuming multi-stream releases. - Enabled TCP nodelay (
stream.set_nodelay(true)) and per-chunk immediate flushes on the localStreamRelayproxy insrc/proxy.rs, eliminating 100–300ms time-to-first-frame buffering delays on loopback sockets. - Implemented negative caching (
Option<Option<String>>) for media player detection (MPV_CACHED,VLC_CACHED,IINA_CACHED) insrc/player.rs, eliminating redundant filesystem scans and registry lookups when players are absent. - Throttled Lua tracker periodic disk sync in
src/player/tracker.rswhen playback is paused or positional change is sub-second, cutting SSD writes by up to 90% during playback pauses. - Removed duplicate redundant
history.save()calls insrc/tui/app/playback.rsupon marking items watched. - Defined
local now = os.time()insrc/player/tracker.rsbefore formatting playback state JSON inmoviebox_tracker.luaand scoped initialPendingPlaybackStateseed writes insrc/tui/app/playback.rsstrictly toPlayerKind::Mpv, preventingVLC,IINA, andAndroidIntentwatch progress from resetting to0on player exit. - Detached spawned media players and the
StreamRelaysidecar into independent OS sessions viaconfigure_detached_process(libc::setsid()+SIGHUPignore on Unix,DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUPon Windows) insrc/player.rs,src/proxy.rs, andsrc/tui/app/playback.rs, redirected playerstderrto temporary log files instead of parent pipes to preventSIGPIPEcrashes when the terminal closes, and reaped the sidecar immediately when desktop players exit while the TUI is open.
- Prioritized native desktop media players (
- Download Engine & Subprocess Diagnostics:
- Added preflight verification for
ffmpegalongsideyt-dlpinsrc/tui/app/download.rs, failing fast with installation guidance when media muxing tools are missing. - Captured child process stderr lines during DASH transfers to surface concrete
yt-dlperror diagnostics instead of bare exit codes. - Accelerated MovieBox DASH stream downloads from ~0.92 MiB/s to ~10.29 MiB/s by passing
--http-chunk-size 95Kand--concurrent-fragments 8toyt-dlpwith resilient retry policies (--fragment-retries 10,--retries 5,--socket-timeout 30) insrc/tui/app/download.rs, resetting Alibaba Cloud Tengine's per-requestlimit_rate_after 96krate-limiter across persistent Keep-Alive sockets. - Refactored the direct HTTP multi-segment downloader in
src/download.rsto pre-allocate the.partfile and write segments in-place via positionalSeekFrom::Startoffsets (scaling concurrency to 4–12 workers down to 16 MB files), eliminating temporary.part.Nfiles and the post-download.assemblingfull-file disk copy.
- Added preflight verification for
- TUI Rendering & Event Loop Performance:
- Expanded terminal standard output
BufWritercapacity from 64 KB to 256 KB insrc/main.rs, enabling atomic frame flushes and eliminating visual tearing during graphical Sixel and Kitty poster transfers. - Replaced allocating
to_string()hash set checks insrc/favorites.rswith zero-allocation borrowed string comparisons inis_favorite, eliminating 400+ heap allocations per second during search grid rendering. - Eliminated redundant 100ms idle tick redraws on static home screens in
src/tui/app/system.rs, dropping idle CPU consumption to zero. - Replaced per-card
Layout::splitinvocations insrc/tui/screens/home.rswith direct row arithmetic calculations, avoiding repeated layout solver overhead across search result slots. - Rendered stream media tags (HDR, ATMOS, 5.1, HEVC, AV1, WEB-DL) in
src/tui/screens/details.rsusing styled surface pill spans and unified background modal dimming totheme.mutedacrossrender_media_tag_spans,resolution_badge_spans(src/tui/widgets/badge.rs),render_poster_placeholder(src/tui/widgets/poster.rs), Details headers (src/tui/screens/details.rs), and Home search result bars, cards, ratings, and history progress rows (src/tui/screens/home.rs). - Replaced linear index iteration with exact O(1)
HashSetlookups inFavoritesManager::is_favorite(src/favorites.rs). - Guarded
PopKeyboardEnhancementFlagsinrestore_terminal(src/main.rs) against Termux environments (!is_termux_environment()), preventing stray ANSI escape sequences from leaking into the Android Termux shell on exit. - Routed
Warning:and non-HomeAction::SetStatusmessages through toast notifications insrc/tui/app/system.rs,src/tui/app/playback.rs, andsrc/tui/app/requests.rs, ensuring subtitle fallback notices, missingiina-cliwarnings, and addon installation statuses remain visible on the Details screen and modal overlays. - Unified notification card geometry and line-wrapping calculations in
compute_notification_cards(src/tui/overlay.rs), eliminating duplicate layout passes between frame rendering and mouse click hit-testing.
- Expanded terminal standard output
- Provider Scraping & Concurrency Engine:
- Replaced chunked mirror resolution barriers in 4KHDHub (
src/providers/fourkhdhub/client.rs,src/providers/fourkhdhub/hubcloud.rs) withHTTP 206 Partial Contentseekability verification (preflight_with_seekable) and score-prioritized early termination (is_seekable && score <= 1), ensuring byte-range-seekable 10Gbps/R2/FSL mirrors are selected over unseekableHTTP 200mirrors or quota-exhaustedworkers.devlinks. - Centralized disk-cached caption lookup and storage in
MovieBoxService::get_ext_captions(src/service.rs) and parallelized primary and sibling dub caption fetches viatokio::join!, eliminating duplicate cache wrappers insrc/tui/app/playback.rsandsrc/tui/app/requests.rs. - Bound individual Stremio addon stream fetches in
src/providers/addons/aggregator.rswith a 5-second timeout, preventing unresponsive third-party addons from blocking stream aggregation. - Capped initial search poster scraping in DhakaFlix (
src/providers/bdix/dhakaflix/client.rs) to the first 20 items, eliminating dozens of blocking HTTP POST requests on large catalog searches. - Centralized
MediaDetails::sibling_ids, human-readable file size parsing (parse_size_bytes), DASH URL detection (is_dash_url),yt-dlpformat selectors (ytdlp_format_selector), download target path resolution (resolve_media_target), and cached poster fetching (MovieBoxService::fetch_and_decode_cached_poster) in their owning domain modules (src/providers/models.rs,src/player.rs,src/download.rs,src/service.rs), and removedsrc/tui/app/network.rs. - Streamed poster HTTP responses via bounded chunk accumulation (
5 MiBcap) inMovieBoxService::fetch_poster_bytes(src/service.rs) and addedFallbackResolverDNS +Range: bytes=0-0bounds toprobe_url(src/net.rs).
- Replaced chunked mirror resolution barriers in 4KHDHub (
- Storage & Disk Cache Engine:
- Optimized typed cache serialization in
src/cache.rsusing direct in-place encoding (rmp_serde::encode::write) into pre-seeded magic header buffers, eliminating intermediate vector allocations and duplicate memory copies. - Pre-allocated file buffer capacity from file metadata in
get_typed_cacheinsrc/cache.rs, eliminating repetitive vector reallocations during cache reads. - Offloaded
atomic_write_file_asyncinsrc/cache.rstotokio::task::spawn_blocking, switchedsrc/logging.rstoWriteMode::BufferAndFlushwith aLazyLockcached home directory path, centralized corrupt JSON file rotation (rotate_corrupt_file) insrc/config.rs, and enabled cross-platform stale update artifact cleanup insrc/updater/apply.rs. - Isolated all unit and integration test runs into a per-process temporary sandbox (
TEST_SANDBOX_DIRinsrc/config.rs) and guarded external browser launches (open_external_urlinsrc/net.rs), preventing tests from modifying real user configuration, watch history, favorites, or disk cache files. - Added unit and mock-server test coverage for
4KHDHubHTTP 206 seekable mirror prioritization,CircleFTPcatalog mapping,DhakaFlixstream extraction,Addonsconcurrent stream aggregation and torrent filtering,TVUTF-8 BOM / HLS M3U parsing,IINAcommand construction,StreamRelayDASH sidecar warmup, non-mpvwatch progress retention, andAction::SetStatuswarning/modal toast routing.
- Optimized typed cache serialization in
Changed
- TUI & Ergonomics:
- Remapped
q/QonScreen::Detailsinsrc/tui/app/keyboard.rsfrom application exit toAction::GoBack, preserving active search results and returning to the home screen without unexpected process termination. - Standardized modal and popup dismissal across Settings, Providers, Browse Presets, Sources, Themes, Addons, and TV Config overlays to dismiss on both
Escandq. - Reordered episode list label formatting in
src/tui/screens/details.rsto compute prefix and progress badge widths before truncating episode titles, strictly preventing list item text overflow and jagged multi-line wrapping. - Replaced ambiguous
" ... [i]"plot synopsis truncation with an explicit" ... [i: More]"indicator insrc/tui/screens/details.rs. - Optimized stream table column constraints for ultra-compact terminals (<65 columns) in
src/tui/screens/details.rs, compactingSIZEto 7 characters and reclaiming columns for release title readability on mobile viewports. - Rendered cached IMDb rating badges across all visible search cards in
src/tui/screens/home.rsby peekingpreview_cache, enabling at-a-glance quality comparison across the grid without manual card-by-card selection. - Collapsed empty
[No Art]poster placeholder columns whenimage_supportedis false insrc/tui/screens/home.rs, expanding search card text and metadata across the full available column width on non-graphical terminals.
- Remapped
- Documentation & Cross-Platform Terminal Compatibility:
- Documented native Windows Terminal Sixel image support requirements (
v1.22+via Microsoft Store) indocs/cross-platform.mdandREADME.md, clarifying that no third-party terminal or configuration is required on Windows.
- Documented native Windows Terminal Sixel image support requirements (