Commit Graph
100 Commits
Author SHA1 Message Date
nvrl 5f62f9c135 feat(android): zero-copy MediaCodec decoding, AV1 back on hardware
hwdec is now mediacodec,mediacodec-copy with every codec allowed. The
direct decoder goes through mpv's aimagereader interop, which loads with
the render context and needs no SurfaceView: frames arrive as
AHardwareBuffers sampled through EGLImages, never copied through memory.

On a Pixel 6 the 4K AV1 file that leaked a frame per frame in copy mode
(B80) now plays in hardware at flat memory, without the green line, and
with a sixth of dav1d's dropped frames.

The copy path stays as the fallback for devices whose interop fails. An
AV1 file that lands there switches to software, since that path leaks.
B49's reasoning (no window, so copy only) is corrected.
2026-11-29 21:50:04 +01:00
nvrl 2b59216f01 feat(android): log the decoder per file, and debug-build mpv knobs
Every file now logs one line naming its codec, size, pixel format and
decoder, in release builds too. B80 needed a phone restart to find because
nothing said mediacodec-copy.

Debug builds read mpv option overrides from debug.pstr.mpv.* system
properties (adb shell setprop), so decoder and buffer experiments on a
phone need no rebuild: hwdec, hwdec-codecs, gpu-hwdec-interop, the demuxer
limits, a free-form extra list, the log level that reaches logcat, and a
ten-second drop and cache line. mpv log levels below warn map to the
matching logcat priority.
2026-11-29 21:50:04 +01:00
nvrl dd9ae19fcf Merge pull request #64 from narrrl/fix/android-av1-copy-leak
fix(android): decode AV1 in software, MediaCodec's copy path leaks
2026-11-29 17:07:21 +01:00
nvrl 27e74c5373 fix(android): decode AV1 in software, MediaCodec's copy path leaks
On a Pixel 6, 4K AV1 through av1_mediacodec in copy mode lost about one
frame-sized buffer per frame below the app. MemAvailable fell from 4.3 GB
to 67 MB in 18 seconds, the system server died and the phone restarted.
The copy path also drew a green line along the bottom of the picture.

Set hwdec-codecs to mpv's default list without av1, so AV1 goes to dav1d.
Other codecs keep the hardware decoder. See docs/BUGS.md B80.
2026-11-29 14:47:33 +01:00
nvrl 2bbe17276a Merge pull request #62 from narrrl/release/2.6.0
chore(release): 2.6.0
2026-11-29 12:51:17 +01:00
nvrl c8b37d6bcf chore(release): bump version to 2.6.0 2026-11-29 12:48:50 +01:00
nvrl 6d7e0ee2cd chore(deps): proton-sdk 0.12.11 and proton-media-rs 0.2.1 2026-11-29 12:47:43 +01:00
nvrl 606614f3be Merge pull request #55 from narrrl/perf/android-readahead
perf(android,ios): no block read-ahead under mpv on the phones either
2026-11-28 20:28:57 +01:00
nvrl 2316f6fc69 Merge pull request #56 from narrrl/perf/android-idle
perf(android): stop working at full rate when nothing changes or shows
2026-11-28 20:28:23 +01:00
nvrl ba58ffd179 Merge pull request #57 from narrrl/perf/desktop-vaapi
perf(desktop): give mpv the display so VAAPI can hand frames to GL
2026-11-28 20:27:58 +01:00
nvrl 6664825d8d Merge pull request #58 from narrrl/perf/desktop-frame-timing
perf(desktop): steadier frame timing, and no decoding behind other pages
2026-11-28 20:27:21 +01:00
nvrl e185a93f35 Merge pull request #59 from narrrl/perf/share-session-fresh
perf(core): a share's session stays fresh while its requests work
2026-11-28 20:27:10 +01:00
nvrl 7c6f6b8b15 Merge pull request #60 from narrrl/perf/desktop-open-path
perf(desktop): don't hold a loaded file for its subtitle files
2026-11-28 20:26:46 +01:00
nvrl 6e87051bbd perf(desktop): give mpv the display so VAAPI can hand frames to GL
mpv's render API needs the windowing system's display connection to set
up hardware decoding that hands frames to GL on Intel and AMD
(render_gl.h: MPV_RENDER_PARAM_WL_DISPLAY / X11_DISPLAY). The render
context was created with neither, so hwdec=auto-safe fell back to
software decoding or copied every frame back to system memory.

The display under eframe's window is now passed through VideoSurface
into VideoRenderer, and the decoder in use is logged once per file as
hwdec-current.

B76.
2026-11-28 19:25:03 +01:00
nvrl e7e33f9d19 perf(desktop): steadier frame timing, and no decoding behind other pages
- The Wayland frame cap sleeps against a fixed schedule. Measured from
  the end of each sleep, overshoots added up and the cap ran below its
  rate, so 59.94 fps video lost frames. The default cap is 144, so a
  59.94 fps film is not right at the ceiling and 120/144 Hz panels are
  not held at 60; frames are still only drawn on demand.
- Position and buffer events no longer ask for a frame of their own
  while the picture is on screen. mpv offers a picture for the same
  video frame, and the extra frame landed at another moment with no new
  picture, which on Wayland made the pacer hold the real one back. A
  250 ms tick still moves the clock when no picture comes.
- Behind another page, mpv's frames were never rendered: each was
  decoded, waited on and dropped, and the picture caught up with a
  stutter on return. The video track is now off while hidden and put
  back on return; audio plays on.

B77.
2026-11-28 19:25:03 +01:00
nvrl b9fc506279 perf(core): a share's session stays fresh while its requests work
SessionAges only counted a refresh as proof of a live visitor session,
so after SESSION_FRESH_FOR (5 min) every open began with a public-link
handshake: info and SRP auth on new connections, then a new session
client with a cold pool. The next episode after any episode paid it
before its first byte, and so did the warm of the next episode near the
credits, moving the playing episode onto cold connections. A successful
operation now marks the session fresh too; a session that died anyway
still gets its refresh and retry when the next request fails.

B78.
2026-11-28 19:25:03 +01:00
nvrl 5f73f0db7f perf(desktop): don't hold a loaded file for its subtitle files
On FileLoaded the player thread waited for every subtitle file beside
the episode to open, each a round trip, before restoring the remembered
tracks. Meanwhile no event was read and no command ran, so the clock
froze and clicks waited, and a remembered audio track switched audibly
once they came. The tracks are restored at once now, and the subtitle
files are added as soon as they are open, with the remembered subtitle
restored again in case it is one of them.

B79.
2026-11-28 19:25:03 +01:00
nvrl 78557fde93 perf(android): stop working at full rate when nothing changes or shows
- The media session gets a new playback state only when the status, the
  actions or the clock's course change, and new metadata only when the
  episode, duration or poster change. It was rebuilt with the poster on
  every 250 ms poll, so SystemUI and the lock screen redrew four times a
  second.
- The poll runs every second while paused, stopped or ended and only
  reports changes then; transport calls wake it at once. The track list
  is read when mpv says it or the pick changed, not every second.
- Without a surface, vid=no stops video decoding (iOS already does);
  attaching a surface turns it back on.
- surfaceChanged only redraws instead of re-creating the EGL surface,
  and a new surface draws the current picture, so a paused picture no
  longer stays black after a rotation.
- The resume point is mpv's start option, set before loadfile, instead
  of a time-pos seek after the file loaded.

B75.
2026-11-28 19:24:08 +01:00
nvrl 1c9e5872fe perf(android,ios): no block read-ahead under mpv on the phones either
B8 turned the block layer's read-ahead off under mpv on the desktop:
12 blocks cost 5.5 s to the first frame and 3.6 s to resume a seek,
against 2.5 s and 1.5 s with none. The mobile bridge, which iOS links
too, built its StreamSource from StreamConfig::default() and kept the
12 blocks. The value is now pstr_stream::MPV_READAHEAD_BLOCKS, passed by
every player (B74).
2026-11-28 18:27:55 +01:00
nvrl 47ea4c73b8 Merge pull request #54 from narrrl/chore/sdk-0.12.10
chore(deps): proton-sdk and proton-drive-rs 0.12.10
2026-11-28 17:46:12 +01:00
nvrl ce09664d9a chore(deps): proton-sdk and proton-drive-rs 0.12.10
The SDK now reports how many times each API call was sent, so
`pstr bench --requests` shows transport attempts instead of
"unavailable".
2026-11-28 17:45:32 +01:00
nvrl d7070b49ac Merge pull request #52 from narrrl/feat/bench-attempts
feat(cli): report the transport attempts behind a benchmark's calls
2026-11-28 17:05:14 +01:00
nvrl c7d8369389 feat(cli): report the transport attempts behind a benchmark's calls
SDK 0.12.10 puts an `attempts` attribute on each `http_request` event:
the first send, retries and the replay after a token refresh. The
request counter adds them up beside the calls and prints the total and
each route's repeated sends. Calls without the attribute are counted
apart, so an older SDK reads "unavailable" rather than a wrong number.
2026-11-28 16:46:13 +01:00
nvrl 82ec1e9c51 feat(cli): count a benchmark's Drive requests by route
`pstr bench --requests` gives the bench its own telemetry sink and
prints, per phase, the API calls by route, the block downloads and the
SDK operations they belong to. Only the share holding the file is
opened, so the share-open count is that share's alone.

Routes keep their shape with ids replaced by `{id}`, and nothing else
from an event is stored, so the report holds no URL, name or token.
The SDK reports one event per logical call, so retries inside a call
are not counted; the report says so.

Moves proton-sdk and proton-drive-rs to 0.12.9, which reports the
public-link handshake to telemetry with fixed endpoint labels.
2026-11-28 15:59:37 +01:00
nvrl d9767518b7 Merge pull request #50 from narrrl/chore/sdk-0.12.8
chore(deps): proton-sdk and proton-drive-rs 0.12.8
2026-11-28 15:07:26 +01:00
nvrl 2ad97de709 chore(deps): proton-sdk and proton-drive-rs 0.12.8
Both crates move together from 0.12.2. 0.12.8 labels each instrumented
HTTP operation with its endpoint, the base the request benchmarks in
PLAN.md count against. No Stream code changes. This commit is the
pre-optimisation baseline.
2026-11-28 13:58:44 +01:00
nvrl cf367e2a8c Merge pull request #49 from narrrl/release/2.5.1
chore(release): 2.5.1
2026-11-25 04:07:36 +01:00
nvrl 943db5a6d7 Merge pull request #48 from narrrl/fix/duplicate-copies
fix(core,android): list a copied episode once, and keep recovered mpv errors off the player
2026-11-25 04:07:25 +01:00
nvrl 4157d1f884 chore(release): bump version to 2.5.1 2026-11-25 04:05:47 +01:00
nvrl aec39e3961 fix(core,android): list a copied episode once, and keep recovered mpv errors off the player
A file copied into a second folder became a second episode: Inuyasha listed
episodes 1 and 2 twice. Library::build now keeps one of each file a title holds
more than once (same name, same size), preferring the copy played last and
otherwise the one in the folder holding more of the title, where an
ordered-chapters episode finds its opening and ending.

Android showed the first error-level line mpv logged as soon as it arrived,
so a High 10 episode that falls back to software decoding put "Could not open
codec." over a playing picture, and a copy without its opening and ending put
the missing timeline there. The error is now held until the file actually
ends with an error, as on iOS, and mpv's warnings and errors go to logcat
under pstr-mpv.
2026-11-25 04:04:59 +01:00
nvrl a14151a706 Merge pull request #47 from narrrl/release/2.5.0
chore(release): 2.5.0
2026-11-25 02:11:03 +01:00
nvrl 53c7e62b8e docs: retake the phone screenshots on the new design 2026-11-25 02:00:46 +01:00
nvrl 52398a3e3c chore(release): bump version to 2.5.0
Desktop screenshots are retaken on the new design, and the Flathub
screenshots point at the v2.5.0 tag.
2026-11-25 01:24:26 +01:00
nvrl c58892b565 Merge pull request #46 from narrrl/feat/season-art
feat(core,meta,app,android,ios): show each season's own poster, name and synopsis
2026-11-25 00:54:30 +01:00
nvrl 1d5fb8ada7 feat(core,meta,app,android,ios): show each season's own poster, name and synopsis
AniList files every season as an entry of its own, and a title matches the
first, so picking season three of The Apothecary Diaries still showed
season one's cover and synopsis.

Enrichment already walks the sequel chain to find the episodes; the
relations query now also asks each entry for its cover, banner, name,
synopsis and year. A library season takes the art of the entry that
answers its lowest-numbered file, and the result is stored as JSON in a
new season_art column (schema 16), kept across a refresh of the match the
same way the chain is.

Desktop shows the picked season's poster, name and synopsis in the title
header; Android (phone and TV) and iOS show its name, cover and synopsis
above the episodes. Seasons the match itself answers keep the title's art.
2026-11-25 00:50:46 +01:00
nvrl 57eca91fb5 Merge pull request #45 from narrrl/fix/android-screenshots
test(android): re-record the screenshot baselines the redesign changed
2026-11-25 00:38:19 +01:00
nvrl f1ed172d42 Merge pull request #44 from narrrl/feat/ordered-chapters
feat: play ordered-chapters openings and endings from beside the episode
2026-11-25 00:37:55 +01:00
nvrl 219ac7038c test(android): re-record the screens the redesign changed
The design overhaul in #39 changed every screen with a card, a focus ring
or a scrim, but the Roborazzi baselines were not retaken, so
verifyRoborazziDebug failed 17 of them on main once #42 got the
Robolectric jars past Maven Central's 429s.
2026-11-25 00:37:02 +01:00
nvrl 18e2b78b2a Merge branch 'main' into feat/ordered-chapters 2026-11-24 23:56:18 +01:00
nvrl 76c2c70be1 feat(core,stream,app,cli,android,ios): play ordered-chapters openings and endings from beside the episode
An ordered-chapters episode links its opening and ending from other files
by SegmentUID. mpv looks for those in the episode's directory, which a
stream does not have, so the chapters were skipped.

Before an episode loads, read which segments it links to, read the
SegmentUID of the unnumbered files in the same folder, and hand mpv the
matching streams as an inline ordered-chapters-files playlist. A
candidate's SegmentUID is remembered by revision for the life of the
process.

On mobile, mpv re-opens the main URL while resolving references and
closes it again; native streams are now reference-counted per open so
that close no longer releases the stream that is playing.

Openings and endings on their own are no longer listed as episodes of a
numbered series.
2026-11-24 23:47:32 +01:00
nvrl db46dfea49 Merge pull request #43 from narrrl/fix/meta-airing-season
fix(core,meta): a show airs while the latest season the library holds does
2026-11-24 23:10:07 +01:00
nvrl 4b86a4f3fc Merge pull request #42 from narrrl/fix/ci-robolectric-download
fix(ci): get Maven Central artifacts past its 429s
2026-11-24 23:09:51 +01:00
nvrl 0146937909 Merge pull request #41 from narrrl/perf/crawl
perf: recrawl only what changed (4-5x faster, 10x less CPU)
2026-11-24 23:09:43 +01:00
nvrl e043f1f474 Merge branch 'main' into perf/crawl 2026-11-24 23:09:31 +01:00
nvrl 2f91a91ed2 Merge pull request #40 from narrrl/feat/pstr-invites
feat: pstr:// invites to share a share or a whole library
2026-11-24 23:09:04 +01:00
nvrl 74c8f92a2a Merge pull request #39 from narrrl/fix/ios-player-and-tv
fix(ios,android) + feat: iOS draw error, TV remote focus, design overhaul
2026-11-24 23:08:44 +01:00
nvrl d4e77d5333 fix(ci): resolve Maven Central artifacts through Google's mirror first
Central's 429s were not only the Robolectric jar: the next runs failed
configuring the root project, on kotlin-stdlib-jdk8, kotlin-reflect and
kotlin-gradle-plugin-model. Gradle now asks Google's mirror of Central
ahead of Central itself, for plugins and dependencies, and CI fetches the
Robolectric jar from the mirror too.
2026-11-24 22:48:58 +01:00
nvrl ae2f400300 fix(core,meta): a show airs while the latest season the library holds does
AniList files each season as an entry of its own and a title matches the
first, so its status and next episode were season one's: The Apothecary
Diaries read "Finished" with no next episode while its third season
aired. Enrichment already walks the SEQUEL chain to the season the files
reach; it now takes that entry's status and next airing episode along,
and the catalog keeps them in a column of their own (schema v15,
latest_airing) so refreshing the match's details does not put season
one's back. The migration re-enriches AniList titles to fill it in.
2026-11-24 22:46:04 +01:00
nvrl 3db0a22715 fix(ci): keep Robolectric's runtime in a cache of its own
Maven Central answered CI's downloads of the 150 MB android-all jar with
429, which failed every Robolectric test: on main, and on most pull
requests since. The Gradle home's copy did not survive, evicted with the
rest of that cache. CI now keeps the jar in a cache keyed on its version,
fetches it with curl's backoff and a checksum when the cache is cold, and
points the tests at it through PSTR_ROBOLECTRIC_DIR. A local build still
stages it through Gradle.
2026-11-24 22:26:04 +01:00
nvrl 2969a4f43f fix(ios): await the engine when decoding and building an invite
NativeRuntime.engine() is async, and the simulator build refused
decodeInvite without the await and inviteLink as a synchronous call. The
outgoing sheet now builds its invite in a task and shows a spinner until
it is ready.
2026-11-24 22:22:07 +01:00
nvrl 4240fe2f62 fix(android,ios): no playback error for a missing ordered-chapter part
A Matroska release that links its opening and ending from separate files
makes mpv log "Failed to find ordered chapter part!" and play the episode
without them. Android showed that line over the playing picture, and on
iOS it could stand in for the real reason a file failed. Both now skip it.
B71 in docs/BUGS.md.
2026-11-24 22:20:12 +01:00
nvrl 57023b7e5c fix(app): say what an invite did, and why a share in it would not open
Opening the shares of an accepted invite showed "crawling" in the top bar
before any crawl had started, and a refused invite said "added nothing"
next to a failure line that gave no reason. The bar now says "connecting"
until the shares open, an invite that added nothing says nothing of its
own, and a single refused share names its reason.
2026-11-24 22:11:58 +01:00
nvrl de9ab54ec6 fix(app,android,ios): issues found walking the library on desktop, phone and TV
Desktop:
- a tile's subtitle under a two-line name was cut through its middle;
  the caption area is 60 px, not 54
- shelves no longer draw a scroll bar over their last captions
- each page keeps its own scroll position, so a title opens at its top
  and Back returns to the same place in the library
- a folded synopsis runs its paragraphs together instead of leaving the
  ellipsis alone on a line
- the Gradient accent setting describes what it does now

Android and iOS:
- over the banner's artwork, More info and My List are a translucent
  wash of the text colour, so Play is the one coloured button
- a tile's press ripple no longer cuts into the first letter of its
  caption
- a show watched through offers Play S01E01, not Continue with S01E01
- on TV, the title page's secondary buttons sit on a wash of the page
  and stay readable over bright artwork
2026-11-24 22:11:58 +01:00
nvrl f56f839340 docs(android): what to try when a TV box plays video in slow motion 2026-11-24 19:50:23 +01:00
nvrl a3e2cfebc2 fix(core): a flat accent on the phone hand-off page's Send button
The last violet-to-orchid ramp outside the icons, on the page a phone
opens from the TV's QR code.
2026-11-24 19:49:17 +01:00
nvrl 46a3df2f04 perf(core,app,android,cli): recrawl only what changed
A crawl of an account folder spent most of its time unlocking file node
keys, one S2K derivation of tens of milliseconds per file, only to read
each file's claimed size. Folders are now walked light (names, revisions,
no file keys), and only files the catalog does not already hold at their
current revision are opened in full (SharedLibrary::crawl_known,
Catalog::known_files). On a 1,353-node library a recrawl went from
20-27 s wall and 88 s CPU to 5 s wall and 9 s CPU. A first crawl costs
what it did; public links have no light listing and are unchanged.

- The catalog stores a crawl as a diff: unchanged rows cost a lookup
  instead of a delete, an insert and three index updates.
- Desktop: row building and SQLite run on blocking threads, off the
  workers the other shares' listings use; shares finishing together
  rebuild the library at most every 2 s, and once at the end.
- Android: shares crawl three at a time instead of one after another,
  the session is refreshed only when old, and the offline index is read
  once per crawl.
- pstr crawl --timings breaks each share's time into listing, parsing
  and storing.
2026-11-24 19:48:23 +01:00
nvrl 749c249ada feat(core,app,cli,android,ios): share a share or a whole library with a pstr:// invite
A share was two secrets in two messages and a trip through the Add form
per share. An invite (pstr-core::invite) carries any number of shares,
links and custom passwords together, as pstr://add?v=1&s=<base64url JSON>,
and is shown as a QR code too.

- Desktop: an invite button on each share row and "Share the whole
  library"; a dialog with the QR code and Copy link. An invite clicked,
  pasted anywhere or typed into the Add form opens a confirmation that
  lists what it adds, greying out shares already here.
- The desktop entry and the MSI register the pstr scheme; a second
  launch hands the invite to the open window.
- Android and iOS: Invite in a share's menu, Send / Copy / QR, and the
  same confirmation for a tapped or shared invite. The TV shows the QR.
- pstr invite / pstr accept in the CLI; accept asks for the invite
  rather than taking it as an argument.

The link is never printed: it is copied or sent on purpose, the clipboard
copy is marked sensitive (Android) and local-only (iOS), and every
surface says that an invite holds passwords. Account folders have no
link and are left out, with a note.
2026-11-24 19:28:01 +01:00
nvrl 0d53d1cf72 feat(core,app,android,ios): solid accents, a copper scale and one scrim curve
- The accent is a flat fill. With gradients on (now off by default) it
  shades into a darker tone of itself, never into orchid.
- Copper gets a 100-700 scale; as an accent on dark it uses the lit 400.
  iOS shows the copper rating star and new-episodes badge like Android.
- Every scrim over artwork follows one eased curve (SCRIM_STOPS), layered
  by job instead of one many-stop ramp. The desktop banner is taller and
  loses its full-picture wash.
- One solid focus ring on every client; the TV gradient border and the
  desktop's inner copper ring are gone.
- Missing art is a plain card with initials, not a hashed colour ramp.
- A portrait poster in a landscape card fills the frame with a dimmed
  crop of itself.
2026-11-24 19:05:31 +01:00
nvrl f5a7b3d048 fix(android): free the TV remote in the player and drop late frames
On a TV the volume slider took left and right on the D-pad, so focus
could not leave it; volume is the TV's job there, so the slider is gone.
The transport buttons wear the focus ring. mpv now drops frames a weak
box cannot decode in time instead of letting video fall behind audio
(issue #5).
2026-11-24 19:05:31 +01:00
nvrl 8be893258f fix(ios): play 10-bit and HDR files instead of failing to draw
Direct VideoToolbox hands mpv's Vulkan renderer surfaces MoltenVK cannot
import for some pixel formats, and the first error line mpv logged was
shown as fatal even when playback recovered. Decode with
videotoolbox-copy, and surface an mpv error only when the file actually
ends with one (B70).
2026-11-24 19:05:31 +01:00
nvrl 3552b978b6 Merge pull request #38 from narrrl/release/2.4.0
chore(release): 2.4.0
2026-11-24 10:24:05 +01:00
nvrl 8fccabba87 Merge pull request #37 from narrrl/fix/design-regressions
fix: the Stream icon in Qt shells, the band round the nav bar, the iOS icon's plate
2026-11-24 10:23:49 +01:00
nvrlandClaude Opus 5.5 c14906d4b2 chore(release): bump version to 2.4.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:21:34 +01:00
nvrl 9ba44520a4 Merge pull request #36 from narrrl/perf/ios-smoother
perf(ios): a smoother player, scrolling and poster grid
2026-11-24 10:17:31 +01:00
nvrlandClaude Opus 5.5 bed7ce525b test(android): re-record the screens that draw the mark
The currents are now pre-cut paths instead of a clip, which moves the
anti-aliasing of a few edge pixels in the top bar's mark. Nothing else
in these eight captures changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:11:37 +01:00
nvrl 408f15d713 perf(ios): keep a few screens of posters decoded
Posters were decoded at 1024 px and the cache held 32 MB, about eleven
of them, less than one screen of the grid, so scrolling back showed
skeletons while every tile was read from disk and decoded again. Portrait
art now decodes at 768 px, enough for a tile on a phone at 3x and an
iPad at 2x, and the cache holds 80 MB. NSCache still lets go under
memory pressure.
2026-11-24 01:10:11 +01:00
nvrl da89e895f8 perf(ios): fill the bars without re-running the page per scroll frame
The library's bar over the banner and the title page's bar took how
solid they were from @State written on every scroll frame, and read in
the page's body, so each frame re-ran the whole page: on the library the
catalog lookups, the featured titles and every shelf; on a title page
the playlist and every episode row. The value now lives in an
@Observable BarReveal that only the bar reads, rounded to fiftieths and
written only when it changes.
2026-11-24 01:10:11 +01:00
nvrl 9994d8e5a2 perf(ios): the player's clock at 4 Hz, and mpv off the main thread
mpv publishes time-pos and demuxer-cache-time once per video frame, and
each reading went to the main thread and rebuilt the whole player: the
up-next card and the time left were read in PlayerView's body. The event
thread now coalesces those two readings to 4 Hz, as Android polls,
holding the latest and sending it when its turn comes even if mpv goes
quiet. Any other event sends what is held first, so a reading of the
outgoing file still lands before the next one's START_FILE, and resets
the pace, so the reading after a seek or a pause is not a beat late.
The skip button, the up-next card and the time left are views of their
own, so a reading redraws only them.

Property reads and writes took the core's lock on the main thread, which
the demuxer holds through a block fetch: a track list read on load was
seven reads per track. Reads, writes and commands now run in order on a
queue of their own (Android's NativeMpvHost keeps them off its UI thread
for the same reason). The track and chapter lists land on the main
thread unless another file was loaded since, and onLoaded waits for the
tracks it reads. load waits for the queue, so a seek queued for the
outgoing file cannot land on the new one.
2026-11-24 01:10:11 +01:00
nvrl d6c7cf4cbb fix(app): paint the page round the floating nav bar
The bar's outer margin is left unpainted so the bar floats, and what
showed there was eframe's near-black clear colour, a dark band round the
bar that light palettes made obvious. The clear colour is now the
palette's background.
2026-11-24 01:02:19 +01:00
nvrl 97b8511954 fix(branding): cut the currents to the prism, and put iOS on Android's plate
Qt shells and launchers drew the Stream icon as a folder: the currents
were oversized shapes clipped to the prism with a clip-path, and QtSvg
ignores clip-path, so they spilled out as a pale slab. They are now cut
in their own paths; rsvg renders the same pixels. The generator refuses
a clip-path in a Drive or Stream mark, since that SVG ships as the
desktop icon.

The iOS icon stood on a pale lavender square. It now takes Android's
deep violet plate and the crop a launcher shows, so both phones show
one icon.
2026-11-24 01:02:19 +01:00
nvrl 0304911d57 Merge pull request #35 from narrrl/feat/tv-watch-next
feat(android): Watch Next and voice search on a TV
2026-11-23 23:44:45 +01:00
nvrl c3d778fd78 Merge pull request #34 from narrrl/fix/ci-robolectric-offline
fix(android): run Robolectric offline against a Gradle download
2026-11-23 23:44:28 +01:00
nvrl 79e43ed842 feat(android): Watch Next and voice search on a TV
Roadmap C4. On a television:

- Continue watching also appears on the launcher's home screen, in its
  Play Next row (TvContract.WatchNextPrograms, WRITE_EPG_DATA), with the
  place and length, the provider's art and synopsis, and the episode's own
  name and numbers, never a file name. A card plays its episode through
  ACTION_PLAY_EPISODE. A card the viewer removed stays off until that
  episode is watched again. Settings → Playback has a switch, on by
  default and shown only on a TV.
- The Search page has a mic beside the field, and the remote's Search key
  opens Search listening from any page (RecognizerIntent).
- The assistant's "search for … on Proton Stream" (SEARCH, SEARCH_ACTION)
  opens Search with what was said; "play … on Proton Stream"
  (MEDIA_PLAY_FROM_SEARCH) plays the one title of that name from where
  the viewer is, else shows the search. A search from outside the field
  moves the focus to its results without leaving a keyboard over them.

Fast-forward and rewind through the media session were already in place
from C1.
2026-11-23 23:28:39 +01:00
nvrl 022c0acd7e fix(android): run Robolectric offline against a Gradle download
Android CI on main failed after v2.3.0 merged: DownloadStateStoreTest,
ScreenshotTest and TvTest all died in MavenArtifactFetcher with an
IOException. Robolectric downloads its Android runtime from Maven Central
by itself while the tests run, outside Gradle, so one dropped connection
fails every Robolectric test. The actions/cache meant to keep that jar never
held anything: a run that fails on the download saves no cache.

Gradle now downloads android-all-instrumented for API 34 like any other
dependency, with its retries and the Gradle cache CI already restores, and
the tests run with robolectric.offline against that copy. The cache step
goes.
2026-11-23 22:59:12 +01:00
nvrl 4409210853 Merge pull request #33 from narrrl/release/2.3.0
chore(release): 2.3.0
2026-11-23 22:14:14 +01:00
nvrl 51c74f1425 Merge pull request #31 from narrrl/feat/suite-look
feat: the suite's look, and a Stream mark with currents
2026-11-23 21:42:12 +01:00
nvrl 715a2eb0ea chore(release): bump version to 2.3.0
Also regenerates the Flatpak's cargo sources, which had fallen behind
Cargo.lock: qrcode, proton-drive-tree-rs and proton-media-rs 0.2.0 were
missing, so an offline build could not resolve them.
2026-11-23 20:46:54 +01:00
nvrl 585439fbfd feat(core,android): add a share to a TV from a phone
Typing a share link on a remote is the worst part of setting up a TV.
Add share on a TV now shows a QR code instead. The phone's camera opens
a page the TV serves on the home network, the link is pasted there, and
the TV opens it through the same path as the typed form. A refusal (a
wrong password, an incomplete link) goes back to the page with the link
kept, so it is fixed where the keyboard is. The phone needs nothing
installed.

pstr-core::handoff listens on the TV's private IPv4 address only, under
a random 60-bit path, for ten minutes or until a share is added. The page
runs no script and its CSP allows none; requests are size- and
time-bounded. It is plain HTTP, which PRIVACY.md states, and "Type it
instead" keeps the ordinary form.
2026-11-23 20:27:28 +01:00
nvrl 71dcbf74b2 fix(android): show a refusal's reason, not "reason=…"
uniffi's generated BridgeException.Failure spells its message out as
`reason=…`, so every refusal the app showed (a link that will not open,
a failed sign-in, a download, a snackbar) began with the field's name.
`Throwable.reason` reads the field itself, and every place a failure is
shown uses it.
2026-11-23 20:27:21 +01:00
nvrl 6ae611a5a4 feat(app): a floating bar, the mark and a visible focus ring
The desktop takes the suite's look: the nav floats as a rounded bar with
the Stream mark, buttons and tabs are pills, cards round to 12, and
new-episodes badges and the rating star wear the palette's copper.
About shows the mark, the version and the suite.

Keyboard focus was nearly invisible on the dark pages. Every focusable
widget now draws a 2px accent ring with a copper inner edge, and a
focused segmented chip no longer shifts its row. Palette cards ellipsise
long names instead of overlapping.

DESIGN-TOKENS gains the suite's shared tokens, shapes and focus, and the
desktop screenshots are retaken.
2026-11-23 19:15:47 +01:00
nvrl b9e48177a0 feat(core,android,ios): the suite's palette, Proton Light and Copper
Proton now wears the plum neutrals and violet of Proton Drive and Proton
Gallery, and its Mauve gradient runs into the icon's orchid. Proton Light
is the suite's light page, and Copper joins the accents. Every palette
carries a highlight, copper on the Proton flavours, which new-episodes
badges, the rating star and the TV focus ring wear.

Android takes the suite's radii (12 cards, 16 sheets, 24 floating, pill
buttons), shows the mark in the Library bar, About and empty states,
and the TV type ramp moves to Inter at tv-material's sizes. Title actions
shrink to fit rather than ellipsise at large font sizes, now pinned by a
360dp, 2x font capture. iOS mirrors the palette, radii and choices.
2026-11-23 19:14:22 +01:00
nvrl 3ca6d58fb8 Merge pull request #30 from narrrl/feat/android-tv-ui
Feat/android tv UI
2026-11-23 17:18:16 +01:00
nvrl 78238f4bad feat(branding): give the Stream mark its currents
The play prism was the one bare glyph in the suite: Drive's folder carries
documents and Gallery's plate carries hills and a sun. Lilac and pink
currents now flow through the prism toward its point. The outline is
unchanged, so the themed launcher icon and the status-bar mark keep the
plain play shape.

The TV banner sets its name in the bundled Inter through a fontconfig that
sees only those files, so no installed font can change its pixels, and
download notifications use the monochrome mark instead of the coloured
launcher foreground. The plain prism is kept in images/branding-archive.
2026-11-23 16:50:34 +01:00
nvrl 316e7b7c4a docs: Android TV screenshots 2026-11-23 16:32:32 +01:00
nvrl 12187ba1d5 fix(android): make the TV pages work with a remote
Ran the TV UI on an Android TV emulator with a real library and fixed
what came up:

- The app started with the focus in the menu, not on the page.
- Left from a card landed on the menu entry level with it, not on the
  page that is open.
- Down on the search field stayed in the field, so the results could
  not be reached.
- Compose's TV scrolling stops a third of the way in, which cut the row
  above in half on Home and scrolled a title's name away under Play.
  Rows on Home now line up under the top, and a title page, search and
  a genre page scroll only as far as needed.
- Home showed My List twice: as its own row and as the core's shelf.
- A focused episode's text was dark on a dark surface.
2026-11-23 16:32:32 +01:00
nvrl f2261acd0e feat(android): give the TV a UI of its own
On a television MainActivity now composes ui/tv/TvApp instead of the
phone's ProtonStreamApp: the same AppViewModel, library, account and
player, laid out for a screen across a room on androidx.tv:tv-material.

- A navigation drawer down the left edge: Home, Search, History,
  Downloads, Shares, Settings.
- Home: the focused title's backdrop, name and synopsis at the top,
  following the focus after a short pause, and rows of Continue
  watching, My List, the shelves and every title under it.
- A title's page opens with Play focused, then Start over, My List and
  Mark watched, season chips, episodes with stills and synopses, the
  franchise and More like this.
- Search and Browse pages; OK on the field opens the TV's keyboard or
  voice input.
- Menu, or holding OK, opens a focusable menu where a phone has a long
  press. Rows remember the card they were left on.
- The player covers everything and nothing is composed under it.
  Leaving the video stops it: a TV has no mini player.
- History, Downloads, Shares and Settings are the phone's pages inside
  the overscan margins for now.
2026-11-23 14:14:39 +01:00
nvrl 31c63d2eb0 Merge pull request #28 from narrrl/feat/android-tv-foundation
feat(android): drive the app with a TV remote
2026-11-23 13:51:53 +01:00
nvrl 42aca0e3b2 Merge pull request #27 from narrrl/fix/app-mpv-teardown
fix(app,player): destroy the mpv core off the ui thread
2026-11-23 13:39:08 +01:00
nvrl 06874c51f4 Merge branch 'main' into fix/app-mpv-teardown 2026-11-23 13:38:58 +01:00
nvrl b40b0c522d Merge pull request #26 from narrrl/fix/player-no-lua-osc
fix(player): start on a libmpv built without Lua
2026-11-23 13:38:22 +01:00
nvrl 6383f26693 feat(android): drive the app with a TV remote
Issue #5: on an Android TV the app installed but needed a touch screen.
This is the groundwork both the phone UI and a later dedicated TV UI
need.

- The focused control is outlined in the accent, and artwork grows a
  little, instead of Material's ten percent tint.
- The Menu key opens what a long press opens: the Continue watching
  and tile menus, and "Mark watched up to here" on an episode.
- Closing a title gives the focus back to the tile it was opened from.
  The featured banner stops turning while one of its buttons is
  focused.
- Player: a key press keeps the controls up, and Play takes the focus
  when they appear. Skip, Up next, the end card and Retry take the
  focus when they show, and Back hides the controls first. Rewind and
  fast-forward seek 10 s, also from the media session. Next, previous
  and stop work too. A TV has no rotation lock or touch lock.
- On a TV: navigation rail, single pane, overscan margins, a shorter
  banner, and a CAPTCHA window that fits a 540 dp screen.
2026-11-23 13:37:54 +01:00
nvrl e1cd344f79 Merge pull request #25 from narrrl/docs/install-32bit
docs: the Android APK also runs on 32-bit ARM
2026-11-23 13:37:53 +01:00
nvrl b8f8ebd5c2 fix(app,player): destroy the mpv core off the ui thread
The window froze for up to a second when an episode ended or the next
one started ("ui thread blocked for 1092 ms drawing the player page").
The UI thread's VideoSurface held the last handle to mpv, so dropping a
stopped Playback freed the render context and then ran mpv_destroy in
the frame, waiting for the demuxer and audio output to wind down. After
an end of file the player thread had not even sent `quit` (B69).

- The player thread sends `quit` on every way out.
- VideoRenderer frees the render context on the GL thread as before,
  then hands the core to an `mpv-teardown` thread. on_exit holds a
  handle across the drop so the core still dies before the process.
- app::timed names the remaining blocking parts at 100 ms: dropping
  the stopped player, rendering the video and mini picture, and
  rebuilding the library view.
2026-11-23 13:28:08 +01:00
nvrl d7b7efc8f0 fix(player): start on a libmpv built without Lua
The Flatpak builds libmpv with -Dlua=disabled, and mpv only declares its
`osc` option when Lua is built in. Player::new set it for the embedded
player and the window fallback alike, so both failed with
MPV_ERROR_PROPERTY_NOT_FOUND and every episode ended in the toast
"start mpv: mpv: Raw(-8)" (B68).

A missing `osc` now counts as already off; every other option still
fails as before. mpv errors are shown by mpv's own name instead of
libmpv2's Debug output.
2026-11-23 13:28:08 +01:00
nvrl a102ccd880 docs: the Android APK also runs on 32-bit ARM 2026-11-23 02:23:57 +01:00
nvrl 0a996c65f5 Merge pull request #24 from narrrl/fix/rpm-metainfo-dir
fix(packaging): spell out the metainfo path in the RPM spec
2026-11-23 01:45:02 +01:00
nvrl 082d388491 fix(packaging): spell out the metainfo path in the RPM spec 2026-11-23 01:35:43 +01:00
nvrl 89a8d48a11 Merge pull request #21 from narrrl/release/2.2.0
Release 2.2.0
2026-11-23 00:37:42 +01:00
nvrl e5195893ad Merge pull request #23 from narrrl/feat/aur
AUR packages: proton-stream, -bin and -git
2026-11-23 00:37:23 +01:00
nvrl a29c5328fd Merge pull request #22 from narrrl/fix/ci-robolectric-cache
ci(android): cache Robolectric's android-all jars
2026-11-22 23:32:38 +01:00