Same class of fix as the Android NDK build: rquickjs-sys has no prebuilt
FFI bindings for Apple targets, so bindgen needs the iOS SDK sysroot and
clang target triple explicitly, or it falls back to the host's own
headers and fails. Unverified — this machine has no Xcode/macOS to
actually run the build; needs confirming on a real Mac.
Thread scraper_id and scraper_settings_json into execute_scraper,
injecting globalThis.SCRAPER_ID/SCRAPER_SETTINGS ahead of the
scraper's own code, matching Nuvio's JsBindings polyfill convention.
Add get_settings_layout to run a scraper's onSettings() export and
return its JSON field layout, with a matching UniFFI export.
plugin_result_to_stream only populated subtitle_tracks, not the subtitles
field Kotlin's Stream model actually reads, silently dropping plugin
subtitles. Also add pluginScraperSettingsUpdated and make repository
re-fetch (on manual refresh or app-start replay) carry over a scraper's
existing enabled/settings instead of resetting to manifest defaults.
rquickjs-sys ships no prebuilt FFI bindings for any Android target
triple, so cargo build --target aarch64-linux-android (and the other
Android ABIs) failed once plugin-js-engine pulled in rquickjs. Switch
the rquickjs dependency to its explicit non-macro feature set plus
bindgen, so bindings are generated at build time via libclang against
the NDK sysroot instead of relying on a missing prebuilt binding file.
Dropped the "full-async" and "phf" umbrella features because they pull
in the rquickjs-macro proc-macro crate, which is compiled for the host
and would otherwise pick up the same BINDGEN_EXTRA_CLANG_ARGS meant for
the Android cross target, corrupting its own bindings. fluxa_core does
not use any rquickjs proc-macro attributes, so nothing is lost.
Adds a plugin_runtime module (rquickjs VM, cheerio-style DOM bridge via
scraper/ego-tree, CryptoJS + WebCrypto polyfill backed by native
digest/HMAC/PBKDF2/AES/RSA/ECDSA) ported from fluxa-desktop's
plugin_runtime, gated behind a new plugin-js-engine feature.
Unlike the desktop version, the in-script fetch() bridge never touches
reqwest directly: it calls a new PluginHttpClient UniFFI callback
interface (Box<dyn PluginHttpClient> -> Arc internally), so Kotlin/Tauri
own the actual HTTP execution and any SSRF protections, consistent with
fluxa_core never performing direct HTTP. execute_plugin_scraper is
exposed as a synchronous UniFFI function alongside the existing
core_invoke surface.
Supports the new Home 'Upcoming' row: isEpisodeReleased lets Kotlin
check whether a specific episode's release date is still in the
future, reusing the existing is_episode_released date logic already
used by calendar/library release detection. upcoming_row_enabled is
a new resolved profile pref, off by default, mirroring
continue_watching_enabled.
Both skip=20 and skip=40 payloads are fully known as soon as
runDiscover completes (only local counters, no dependency on the
first page's contents), so there's no reason to wait for skip=20's
completeEffect before requesting skip=40. Emit both FetchDiscoverPage
effects together, tagged with the same DiscoverPaging generation.
stremio-core never hands PlayerFrame streams to its native streaming
resolver either (get_streaming_url only matches Url/Torrent/YouTube) —
it's an embeddable frame URL, not a playable file, so it belongs with
externalUrl rather than stream_playable_url.
Stremio addons use externalUrl to mean "open outside the player"
(purchase pages, addon config links, etc.), not a media file. It was
being fed straight to mpv as a playable candidate, causing
"unrecognized file format" crashes. Now exposed separately as
externalUrl so callers can open it via the system browser instead.
The chapter reader assumed Chapters always sits before the first
Cluster within a small prefix, but releases with sizeable embedded
attachments (fonts, etc.) can push Chapters well past that — one
observed case had it at ~10MB in, past the first Cluster entirely, so
the existing scan (which stops at the first Cluster) found nothing.
MKV's SeekHead element is always compact and near the file start and
routinely carries an entry pointing straight at Chapters. Have
scan_segment also record that offset when Chapters isn't found
directly, expose it via parse_mkv_chapters_json's new seekOffset field,
and add parse_mkv_chapters_at_offset_json to parse a buffer fetched
starting exactly at that offset. This also means the initial scan no
longer needs a multi-megabyte prefix to work reliably.
replace_external_continue_watching_json deduped items via a HashMap and
returned them via into_values() with no final sort, so the order was
whatever HashMap's randomized per-process iteration produced instead of
most-recently-watched-first. Sort descending by saved_at_ms before
returning, matching the pattern already used by
trakt_playback_items_dedup_json.
The marker search stopped at the first "anilist.co/anime/" occurrence,
so a malformed link with no trailing id (or a share URL missing the
numeric suffix) silently hid a valid AniList link listed after it.
Desktop's anime-tracking gate, link-based AniList ID extraction, and
search-result best-match selection were duplicated logic Android lacks
entirely (it only tracks progress when a meta id is already prefixed
anilist:). Porting the decision logic here — while keeping GraphQL I/O
and caching on the platform side — lets both platforms share it.
Extends existing cross-platform domain modules (nuvio_sync, addon_store,
home_ranking, watchlist_plan, external_sync, player_policy, player_scrobble,
calendar_plan, search_plan) with logic previously duplicated or missing on
the desktop side, so it's implemented once and reused across platforms.
Kotlin's LibraryItem DTO never declared removed/_mtime, so even though
this file already worked on raw JSON Values, those fields never
survived the trip from the Stremio datastore response. Adds
libraryWatchlistItems (id/name/type/poster/background/updatedAtMs,
excluding removed items) so the pull side can finally see Stremio
library membership as a timestamped list, matching the shape the
mergeWatchlistTimestamped bridge expects. Also fixes
libraryContinueWatchingItems, which never checked "removed" at all --
a removed item with leftover progress state could still surface as
continue-watching.
anilist_entries_to_sync built a "watchlist" array from PLANNING-status
entries but never attached a timestamp to it, so nothing downstream
could run a timestamp merge against it. Adds updatedAtMs (converted
from AniList's updatedAt seconds, falling back to now_ms when absent)
so the Kotlin side can feed these into the same timestamped-merge
path already used for Trakt's watchlist.
AniList integration has been pull-only — no mutation is ever sent, so
watchlist/mark-watched changes made in Fluxa never reach AniList, even
though its OAuth token already has full read/write access (no scope
restriction). Adds a pure function that extracts the numeric media id
from the "anilist:<id>" content id scheme and builds the GraphQL
mutation variables, so the Kotlin side only needs to POST the
variables through the existing generic anilistGraphQl call.
Matches the nuvioImportMergePlan convention (args_json fields carry
raw JSON, not JSON-encoded strings) so Kotlin callers don't need to
double-serialize the local/remote item arrays.
Trakt, Simkl, and Stremio currently reconcile watchlist and watched
state as blind set-unions (merge_external_watchlist_json/merge_external_watched_json)
with no notion of "which side changed more recently." Nuvio already
resolves this kind of conflict with timestamp comparisons; this adds
the same capability as a provider-agnostic core_invoke method
(mergeWatchlistTimestamped/mergeWatchedTimestamped) so Trakt/Simkl/
Stremio can reuse it instead of duplicating Nuvio-specific logic.
Takes local items (id, updatedAt, active) and remote items (id,
updatedAt), and returns which ids to apply locally vs. push to the
remote, picking a winner per id by comparing timestamps.
Retire hand-written per-function JNI bindings in fluxa-core in favor of
the generic core_invoke(method, args_json) dispatcher already exposed
via UniFFI. Every stateless domain function (calendar, watchlist, addon
parsing, trakt/simkl sync, home ranking, player policy, etc.) is now
reachable by method name through core_invoke; jni.rs keeps only the
coreInvoke passthrough and the handle-lifecycle functions that manage
opaque stateful engine/state handles, which don't fit the stateless
JSON-in/JSON-out shape.
Progress rows synced before duration is known carry a bogus >24h
duration; require >=99.5% completion for real durations instead of also
matching <0.5% starts.
An episode-shaped title (tt123:1:2) now resolves to the file whose name
contains s01e02/1x02 before falling back to the largest video, and
fallback candidates are ordered episode-matches-first. Fixes playing the
wrong file from season-pack torrents where a later episode is larger.
fluxa-desktop's nuvioSync.ts held the whole Nuvio import policy in
TypeScript: watchlist mapping, progress-entry construction (up-next
thresholds), watched-history reconciliation, savedAt bumping, profile
and collection mapping. That logic moves here as nuvio_sync.rs so other
shells share one implementation; the desktop keeps only the pulls and
persistence.
Also exposes three policies the desktop had duplicated or hardcoded:
airDateRefreshCandidates (12h cooldown due-check), simklScrobbleAction
(stop/pause threshold, reusing SCROBBLE_STOP_PROGRESS_PERCENT), and
torrentReadyBudget (torrent readiness retry budget).
Derive a playable magnet URI from a stream's infoHash/sources (or
detect an existing magnet/torrent URL) via stream_magnet_link, and
let the offline-download planner accept torrent-sourced streams
instead of rejecting them outright.