Commit graph

316 commits

Author SHA1 Message Date
KhooLy
6087dcdf97 feat(desktop): embed libVLC playback instead of a separate window
- libvlc_render.rs: locate/load libvlc more robustly (Windows DLL
  search path, plugin path discovery), route libvlc log messages into
  the app logger, lazily create the media player, and add audio
  mute/track and subtitle-track control bindings.
- macos_player_surface.rs: attach the libVLC output to the native
  NSView so it renders inside the app window (macOS), switching
  between the Vulkan and libVLC render paths based on the active
  engine.
- Update the player-engine description strings to reflect that libVLC
  now renders embedded rather than in its own window.
2026-07-27 16:13:03 +03:00
KhooLy
52284c53f8 fix(windows): synchronize native player controls and status 2026-07-26 14:48:01 +03:00
KhooLy
64025232f9 fix calendar provider sync and presentation 2026-07-26 04:40:02 +03:00
KhooLy
0c46c16001 Fix similar title source picker and Trakt results 2026-07-26 03:36:04 +03:00
KhooLy
f0e1a13fe8 Keep profile controls accessible during image selection 2026-07-26 03:22:41 +03:00
KhooLy
dd82614e57 Improve profile image pack selection 2026-07-26 03:18:56 +03:00
KhooLy
f357af0d9e Add profile picker customization and recommendation sources 2026-07-26 03:13:56 +03:00
KhooLy
e194041b3f Retry Trakt sync after authorization failures 2026-07-26 02:53:48 +03:00
KhooLy
0136de4549 Improve external library sync settings 2026-07-26 02:24:25 +03:00
KhooLy
3e7b8d062e feat: add provider library sources and sync fixes 2026-07-26 01:09:30 +03:00
KhooLy
b9e7e6f805 Fix desktop OAuth callback handoff 2026-07-26 00:29:40 +03:00
KhooLy
aeadd2b81a feat: show addon uptime status 2026-07-22 18:48:31 +03:00
KhooLy
5ea0d04a13 refactor: split desktop player and engine modules 2026-07-22 18:46:44 +03:00
KhooLy
73b5c5c2ec Delegate desktop sync decisions to core 2026-07-22 16:56:22 +03:00
KhooLy
87d9739956 feat: organize plugin repositories 2026-07-22 02:16:12 +03:00
KhooLy
876c61bd73 feat: improve desktop calendar and plugins 2026-07-22 02:10:23 +03:00
KhooLy
5c0ce696de open externalUrl streams in the browser without flashing the player
The external-stream check ran after showPlayerLoading had already
fired, so tapping a paywall/config-link stream card briefly opened the
player loading overlay before falling back to the browser. Moved the
check to the top of handlePlay, before any player UI state is touched.
2026-07-19 16:35:39 +03:00
KhooLy
0b693c3c57 pass the required unknownName arg to core's parseManifest
The TS wrapper never sent it, so every addon manifest fetch failed at
the FFI boundary with "missing field unknownName" before the manifest
body was even read.
2026-07-19 16:35:07 +03:00
KhooLy
df290f27c6 delegate anime-tracking detection and AniList matching to fluxa-core
Replaces the local regex-based detection heuristic and search-result
matching with calls into fluxa-core, so the same logic Android can now
also use isn't duplicated (or drifting) between platforms.
2026-07-18 23:52:35 +03:00
KhooLy
fdccb06183 delegate remaining screen and hook policy to fluxa-core
Continues the shared-core migration: addon sort/priority ordering and
disabled-addon filtering now route through fluxa-core instead of being
computed locally, alongside the broader policy delegation already
in flight across screens and hooks.
2026-07-18 23:38:19 +03:00
KhooLy
87f209d7fb use shared core business policies 2026-07-18 21:47:47 +03:00
KhooLy
dcbd7880e6 use native fullscreen on Linux 2026-07-18 21:09:47 +03:00
KhooLy
e054fd06bc delegate reusable policy to fluxa core 2026-07-18 21:05:30 +03:00
KhooLy
a31ae053de Move business policy from the shell into fluxa-core
- nuvioSync.ts drops its in-TS import/merge policy (watchlist mapping,
  progress construction, watched reconciliation, savedAt bumps, profile
  and collection mapping) and now orchestrates pulls around
  nuvio* core methods, including the pending savedAt-bump behavior
- animeDetection.ts deleted: dead duplicate of core anime_detection,
  playback already used coreDetectAnimePlayback
- air-date refresh due-check, SIMKL scrobble stop threshold, and the
  torrent readiness budget now come from core instead of local constants
2026-07-16 18:53:51 +03:00
KhooLy
c1f36a7359 Route UpdateModal strings through i18n 2026-07-16 18:05:58 +03:00
KhooLy
c08a9c610e Add missing i18n keys for render backend and player engine settings
Some checks failed
Warm Windows ANGLE Cache / warm-angle-cache (push) Has been cancelled
settings.render_backend(_desc) and settings.player_engine(_desc) were
referenced via t() but never added to either locale file, so the
hardcoded || fallback strings were silently used instead.
2026-07-15 19:38:34 +03:00
KhooLy
b2ad5e55ea Surface Nuvio sync errors in the settings UI
Previously sync failures were silently swallowed. Record errors into
NuvioSyncMeta on both the automatic and manual sync paths, and show
a "Sync error" status line in the sync service popover when present.
2026-07-15 19:36:14 +03:00
KhooLy
736b99313e Add stream/magnet link copy and download-from-context-menu
Adds a context menu on the player overlay and source rows to copy a
stream's direct/magnet link or trigger an offline download, backed
by a new stream_magnet_link command and a torrent-download resolver
that reuses (or starts) the torrent server on demand. Also refactors
start_torrent_stream's health-check into ensure_healthy_torrent_base_url
for reuse, and keeps the torrent server alive across stream stops so
downloads can still be resolved, tearing it down only on app exit.
2026-07-15 19:36:03 +03:00
KhooLy
dfc1299215 Add libVLC as an alternate playback engine
Introduces a PlaybackEngine trait so playback can be routed through
either mpv or a new dlopen-based libVLC backend, selectable from
settings. libVLC currently plays in its own separate window rather
than embedded, since it doesn't support headless frame rendering.
2026-07-15 19:35:24 +03:00
KhooLy
21c674dc43 Add Vulkan and D3D11 GPU render backends for mpv playback
Adds selectable Vulkan (Linux/macOS/Windows) and D3D11 (Windows,
HDR-capable) rendering paths alongside the existing OpenGL mpv
surface, wired through mpv's native render API, plus a Wayland
subsurface helper for Linux compositing and a settings toggle to
pick the backend.
2026-07-15 19:34:12 +03:00
KhooLy
1022d26dda Fix silent audio after switching audio track mid-playback
Switching aid on a track mpv wasn't previously demuxing can leave its
packet queue stale at the current position until something forces a
resync, so audio stayed muted until the user manually seeked. Issue a
small forward exact seek right after the track switch to trigger that
resync automatically.
2026-07-14 22:25:11 +03:00
KhooLy
78acb8e6fb Add the fetchPluginManifest effect handler
pluginRepositoryAddRequested dispatches a fetchPluginManifest effect
from fluxa-core, but nothing fulfilled it — it would have sat pending
forever. Adds the runner: fetch the manifest over http_fetch_text,
validate/normalize via pluginManifestParse, hand {manifestUrl,
manifest} back to completeEffect, which plugins::complete on the core
side upserts into state.plugins.repositories/scrapers.

Also adds executePlugin/fetchPluginManifest to the hand-maintained
EffectType union in contracts.ts, which must mirror fluxa-core's
EffectKind — the same kind of drift that caused the from_str bug
earlier in this branch.
2026-07-13 17:24:08 +03:00
KhooLy
af37a159d4 Wire plugin scrapers into detail stream loading
fetchDetailStreams now also runs enabled plugin scrapers (read from
the headless engine's plugins.scrapers snapshot) alongside installed
addons: resolves a TMDB id via the existing resolveTmdbId lookup,
downloads and caches each scraper's JS over http_fetch_text (same
net_guard SSRF check as addon requests), runs it through
run_plugin_scraper, normalizes via pluginStreamResultsToStreams, tags
results with addonName = scraper name, and folds them into the same
streams/availableAddons list addon resources already produce — so
plugin-sourced streams flow through the existing merge/ranking path
with no new UI-side handling needed.

Scraper execution failures are swallowed (Promise.allSettled) so a
broken plugin can't take down addon stream loading.
2026-07-13 17:21:33 +03:00
KhooLy
18e0eed24c Add production plugin runtime: rquickjs sandbox behind run_plugin_scraper
Promotes the rquickjs spike into a real Tauri command. Executes a
Nuvio-compatible scraper's getStreams() in a sandboxed QuickJS VM with
fetch (routed through net_guard::ensure_public_host, same SSRF guard
as http_fetch_text/http_execute_text) and the full cheerio bridge.
Runs via spawn_blocking with its own current-thread tokio runtime
since the DOM state (scraper/tendril) isn't Send; a 60s wall-clock
timeout matches Nuvio's own plugin timeout.

DomBridge switched from Arc<Mutex<_>> to Rc<RefCell<_>> per clippy —
it's only ever touched from the single thread each execution owns.
2026-07-13 17:17:41 +03:00
KhooLy
d4e170be27 Regenerate coreMethods.ts for pluginManifestParse/pluginStreamResultsParse
fluxa-core added these two core_invoke methods for parsing Nuvio-style
plugin manifests and getStreams() output.
2026-07-13 16:22:55 +03:00
KhooLy
18db03bb1f Delegate similarTitles/search-merge/fetch-policy/link-classification to fluxa-core
fluxa-desktop is meant to be a thin shell over fluxa-core, but several
pieces of business logic had crept into TypeScript: Trakt/Simkl similar-
titles response mapping, search/discover source merging, addon fetch
retry/timeout/concurrency/race policy, AnimeSkip episode matching,
continue-watching week partitioning, library merge diffing, and
cast/director link classification (duplicated across three components).
All of it now calls the corresponding new fluxa-core methods and just
executes/renders the result.
2026-07-13 04:29:58 +03:00
KhooLy
1bbea10434 Fix stale Continue Watching episode labels 2026-07-13 03:15:48 +03:00
KhooLy
2c5b159605 fix(player): wait for rendered video before handoff 2026-07-13 02:24:24 +03:00
KhooLy
91a68c899e Fix YouTube trailer playback and fullscreen overlay rendering
Route trailer resolution through fluxa-core's engine instead of a
duplicated desktop-side implementation, and add a thin local HTTP
proxy so the WebView's <video>/<audio> elements can stream the
resolved googlevideo URLs (which reject requests without proper
Range/client handling) without hitting CORS or range-negotiation
issues directly.

Also fix fullscreen trailer playback: requestFullscreen() was being
called on the bare <video> element, so sibling overlays (subtitle
text, progress bar) weren't descendants of the fullscreened element
and disappeared. Both hero trailer views now wrap video + overlays in
a shared container and fullscreen that instead.
2026-07-13 02:00:14 +03:00
KhooLy
fde3f44f21 fix(player): apply stream request headers 2026-07-12 18:58:48 +03:00
KhooLy
ebf8a2adf6 Preserve Nuvio collection sources in desktop sync 2026-07-12 18:49:06 +03:00
KhooLy
73cde13c90 Add TMDB as a built-in metadata provider
Users who remove Cinemeta/AIOMetadata and rely on a TMDB key alone got
nothing, because the TMDB key only powered narrow artwork/trailer
enrichment on top of a Meta object that had to already exist from a
real addon. When a TMDB key is set, it now acts as a synthetic addon
(transportUrl "tmdb://builtin") that plugs into the same catalog/meta
resolution pipeline real addons use for Home/Discover catalogs, search,
meta detail, and episode lists (including thumbnails and title logos
from TMDB's own /images endpoint) - everything except streams, same as
Cinemeta.

The synthetic addon is never persisted, never pushed to Nuvio/Stremio
sync, and never shown in the Addons list; each catalog/meta/episode
call site is patched individually to bypass the addon-protocol URL
builder (which would mangle the tmdb:// scheme) and resolve it
in-process instead via src/core/tmdbAddon.ts. A new "Prefer TMDB over
other metadata addons" toggle controls whether it's checked first or
only fills gaps.
2026-07-12 13:49:28 +03:00
KhooLy
43aa2b863b Stop dropping disabled addons during Nuvio profile import
fetchAddonManifests filtered the pulled addon list down to only
enabled entries before writing it to local storage. Since this import
runs automatically on startup and on every periodic Nuvio health
check, disabling an addon (which pushes enabled:false to Nuvio) got
that addon wiped from local storage on the next sync instead of just
marked inactive. Keep all pulled addons in the descriptor list and
only skip the manifest fetch for disabled ones.
2026-07-12 13:14:49 +03:00
KhooLy
62e8af09df Filter disabled addons from Home catalogs and hero banner
Disabling an addon never invalidated Home's catalog/billboard state,
so its content kept appearing until an unrelated cache refresh. Filter
disabled addons before building metadata feeds, and trigger a forced
Home reload right when an addon is toggled.
2026-07-12 13:14:44 +03:00
KhooLy
c181126a07 Hide Discover result count 2026-07-12 01:43:35 +03:00
KhooLy
885a341a4f Use loading error screen for playback failures 2026-07-12 01:29:37 +03:00
KhooLy
099e2925b6 Fix catalog pagination deduplication 2026-07-12 01:24:03 +03:00
KhooLy
84349c1daa Replace blocking playback-error modal with a toast, surface subtitle addon failures
Playback errors now show as a dismissible top-right toast instead of a
full-screen backdrop, using a new reusable Toast component. Subtitle addon
and track load failures, previously swallowed silently, are now collected
and surfaced as a warning toast too.
2026-07-12 01:18:14 +03:00
KhooLy
c88e6c9d1b Allow removing a single recent search entry
The header search bar's recent-history dropdown only supported
clearing the whole list. Add a per-item remove button, matching the
per-item removal already present on the full search screen.
2026-07-12 00:57:57 +03:00
KhooLy
aaf1ddfe18 Remove torrent source debug panel from loading overlay
The Source/Provider/File/File index/Info hash/URLs block is debug
info with no value to a regular user watching something load.
2026-07-12 00:57:57 +03:00