Commit Graph
63 Commits
Author SHA1 Message Date
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 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 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 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 4157d1f884 chore(release): bump version to 2.5.1 2026-11-25 04:05:47 +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 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
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 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 64aa2e6c68 chore(release): bump version to 2.2.0 2026-11-22 23:09:42 +01:00
nvrl c896693ff8 feat(core,app,android,ios): crawl own-Drive folders when Drive reports a change
The crawl and ShareClient now come from proton-drive-tree-rs: DriveTree is
the old ShareClient, and walk is the old parallel, retrying crawl plus a
cycle check. A crawl of an account folder also records where Drive's change
feed stood and which nodes it found.

The desktop app polls the feed every 2 minutes and crawls the account
folders that changed. Android and iOS do the same in their 5-minute loop
through the bridge's new changed_shares. Public links have no feed and keep
the 6-hour recrawl.
2026-11-22 19:19:08 +01:00
nvrl 8ab7d429af refactor(stream): build on proton-media-rs 0.2.0's stream engine
The ring, StreamSource, VideoStream, disk cache glue and RevisionBlocks
moved to proton_media_rs::stream. pstr-stream keeps LibraryOpener and
re-exports the rest under the old names, keyed by NodeUid, so the app,
the Android bridge and the player tests are unchanged. The disk cache
key is the same string, so existing caches still hit.
2026-11-22 17:09:32 +01:00
nvrl 646db3a61b refactor(core): sign in through proton_sdk::login
proton-sdk 0.12.2 carries the sign-in steps, so account.rs uses
proton_sdk::login and stores from ResumeParameters; the stored layout is
unchanged. Share tokens come from the SDK's parse_public_link_url with
Stream's own messages; a link with an empty #fragment is now refused at
add time too.
2026-11-20 17:26:20 +01:00
nvrl fe93942420 refactor(core): sign in through proton_auth_rs::session
The sign-in steps (CAPTCHA retry, second factor, mailbox password, key
unlock) are now the sequence Proton Gallery and proton-drive-linux share.
The stored proton-account blob and its refresh write-back are unchanged.
2026-11-20 15:37:59 +01:00
nvrl c4b0165f7d feat: keep thumbnails and artwork in the shared picture cache
Proton thumbnails (desktop and Android) and provider artwork go through
pstr_core::pictures, a thin layer over proton-media-rs ImageCache: a
256 MiB budget each with least recently used eviction, entries a crash
cannot leave half-written, and hashed paths so no share id, link id or
URL reaches the filesystem. Before, both directories grew without limit
and the desktop wrote entries in place.

The stores live in cache/thumbnails and cache/artwork; the flat thumbs
and posters directories of earlier versions are deleted on first use,
so each picture is downloaded once more.
2026-11-20 14:18:57 +01:00
nvrl b23614f2ff refactor(stream): block maps, single flight and disk cache from proton-media-rs
pstr-stream keeps its BlockKey-keyed DiskCache as a thin wrapper over
proton_media_rs::DiskCache, with the node UID as the file identity, so
caches written by earlier versions are adopted unchanged.
2026-11-20 12:59:36 +01:00
nvrl 7354a59636 refactor(core): migrations and atomic config writes from proton-base-rs
The catalog migrates through proton_base_rs::Schema with the same 14 steps
and refuses a newer database before any pragma touches the file.
write_json now uses proton_base_rs::atomic::write: a unique temporary file
per write, and config files readable by the owner only.
2026-11-20 12:10:17 +01:00
nvrl 9cebd1fe0f refactor(core): keep secrets through proton-auth-rs; rusqlite 0.41
The desktop credential store is now proton-auth-rs, shared with
proton-drive-linux and Proton Gallery, instead of keyring 3 and a local
chunking module. It reads the entries keyring 3 wrote and the chunk
header this app wrote, so saved shares and the account session survive
the move. It also reconnects once when the Secret Service restarts.

KeyringSecretStore becomes pstr_core::keyring_secrets(), one store per
process. Android and iOS keep their own SecretStore through the bridge.

rusqlite goes from 0.32 to 0.41: the suite links one bundled SQLite.
2026-11-20 12:01:55 +01:00
nvrl c0298dab38 chore(version + deps) 2026-11-18 02:01:30 +01:00
nvrl da13f0547e chore(release): bump version to 2.0.1 2026-10-31 14:14:45 +01:00
nvrl c9925b4b09 chore(release): bump version to 2.0.0 2026-10-31 03:42:32 +01:00
nvrl 79f0d74e1a chore(release): bump version to 1.7.0 2026-10-28 02:43:25 +01:00
nvrl 658c620c82 chore(release): bump version to 1.6.2 2026-10-17 21:05:19 +02:00
nvrl 6e0be9e3c8 chore(release): bump version to 1.6.1 2026-10-15 22:50:10 +02:00
nvrl 4a3a7291b8 chore(deps): proton-sdk and proton-drive-rs 0.9.0
Adapt sign-in to the 0.8 account API and use what it adds:

- Key passphrases are KeyPassphrases now, wiped on drop. The stored
  session keeps its JSON shape and converts on unlock.
- The mailbox password is checked with AccountClient::unlock(), one
  core/v4/users request instead of loading every address, and a wrong
  one is recognised as ProtonError::KeysLocked instead of any
  InvalidOperation.
- KeysLocked from a resumed session counts as signed out: the mailbox
  password changed, and only signing in again derives passphrases that
  unlock the keys.
- A sign-in Proton answers with code 2028 (Blocked) says so, instead of
  showing the server text that claims the app version is outdated.

Also picked up without code changes: a token refresh that outlives its
caller and is never replayed (0.8.2).
2026-10-15 19:56:56 +02:00
nvrl ab7f057afe chore(release): bump version to 1.6.0 2026-10-14 22:12:58 +02:00
nvrl 69981e3b45 chore(release): bump version to 1.5.1 2026-10-13 23:29:57 +02:00
nvrl 04fc1f04fe chore(vers) bumped version to 1.5.0 2026-10-13 18:26:47 +02:00
nvrl 31bdd75559 feat(app): turn on AccessKit, and name the controls drawn as icons
eframe now builds with its accesskit feature, so the widget tree reaches
the platform screen reader. Buttons drawn as an icon glyph were read as
the icon font's private code point, and the hand-painted ones (play,
poster tiles, the watched mark, download rings, the seek bar) as
nothing. A Named trait gives them a name, and hint() makes the existing
hover text that name.
2026-10-13 16:29:36 +02:00
nvrl ce02bbc35a fix(vers) updated cargo + pkgbuild version 2026-10-12 19:10:58 +02:00
nvrl 2f3be1d193 chore(version): bump to 1.4.0
Minor. Sync now carries the whole library, not only watch positions:
shares with their links and passwords, playback, appearance and metadata
settings, the TMDB key, hand-picked matches and per-title tracks, so every
signed-in device shows the same library. Devices share it once all of them
run 1.4.0; an older build keeps syncing watch positions and ignores the
rest.

Android drops picture-in-picture. iOS fixes the stretched player after a
rotation or resize, the share that failed to add on the first try, and
settings that saved late or silently. Both phone clients now show what is
running and why a form was refused.

No catalog schema change since 1.3.0.
2026-10-09 03:15:55 +02:00
nvrl dc70cafbb7 chore(version): bump to 1.3.0
Minor. One new client: an iOS 17+ app, a SwiftUI port of the Android one
over the same Rust engine, published as an unsigned .ipa for SideStore and
AltStore. docs/IOS.md lists where iOS cannot follow Android: no
picture-in-picture, links come in through the protonstream:// scheme or
Paste link rather than the share sheet, and downloads run while the app
does.

No change to the Rust crates, the catalog schema or the desktop and Android
clients since 1.2.0.
2026-10-07 01:55:22 +02:00
nvrl da16ab0575 fix(core,app,android): keep the password out of storage and refuse key-only 2FA
Moves to proton-sdk / proton-drive-rs 0.7.3.

The stored Proton session now holds, per account key, the passphrase derived
from the mailbox password at sign-in, and resumes through
`ProtonDriveClient::with_key_passphrases`. The mailbox password — on a
single-password account, the login password — and the key salts are no longer
stored. A session in the earlier shape, which only development builds of
1.2.0 wrote, reads as signed out: signing in again replaces it.

An account whose only second factor is a security key is refused at sign-in
with a reason, rather than asked for a code that can only fail as a wrong one.
The code prompts now say plainly that security keys are not supported.
2026-10-06 15:01:37 +02:00
nvrl d9ca8f8d60 fix(core,app,android,cli,packaging): harden account sign-in and watch-history sync
- Desktop shows Proton's CAPTCHA instead of failing the sign-in: a wry webview
  in a child process of the app (`pstr-app::verify`), confined to
  https://*.proton.me, hands the token back and the sign-in is retried. Linux
  packages and CI gain WebKitGTK 4.1; the Windows zip and MSI ship
  WebView2Loader.dll, without which a -gnu build does not start.
- The desktop keyring splits a secret too long for one entry across several,
  so a Proton session with many key salts survives Windows' 1280-unit cap.
  Short secrets stay one entry, so every existing secret still reads.
- `WatchSync` runs against a small `HistoryDrive` trait and is tested end to
  end against an in-memory Drive: two devices, newer wins, no re-upload of an
  unchanged history, a missing file written again, an unreadable own file
  never overwritten, a newer-format file left alone.
- An installation's file unwritten for 90 days is retired by the next device
  to sync, after its entries are merged and carried in that device's file.
- Removing a share keeps its watch state: sync would bring it back from the
  other devices anyway, and re-adding the share picks up where it left off.
- Watch history syncs once more on desktop exit (bounded to 3 s) and, on
  Android, through a WorkManager job enqueued when the app leaves the screen.
- The second-factor prompts say security keys are not supported.
2026-10-06 14:30:15 +02:00
nvrl 26cccd5c63 chore(version): bump to 1.2.0
Minor. Two new features, both optional and both behind signing in to a Proton
account:

- Sign in with a Proton account (password, two-factor code, separate mailbox
  password) on desktop, Android and the CLI, and add folders of your own Drive
  — My Files, other devices, shared with me — as library shares next to public
  links. The session lives in the OS credential store, never in shares.json.
- Watch history follows you across devices. Each installation keeps its own
  file on a `proton-stream` device in your Drive and merges everyone else's
  per episode, newest position wins. It syncs at launch, after sign-in, when
  the player closes and every five minutes.

Also: Android offline downloads no longer look stuck (B64), and picking a
metadata match by hand refreshes the title's episodes and artwork.

The catalog schema is unchanged from 1.1.3. A new `sync.json` beside
`shares.json` holds this installation's sync id.
2026-10-06 13:19:52 +02:00
nvrl 0b2813cd42 feat(core,stream,meta,app,android,cli): sign in to Proton and sync watch history
A Proton account is now optional alongside public links. Signing in (password,
then a second-factor code and a mailbox password where the account has them;
a CAPTCHA gate is solved in the Android app) stores one session blob in the OS
credential store under `proton-account`, writing back every refreshed token
since refresh tokens are single-use. With an account, folders of the viewer's
own Drive — My Files, other devices, shared with me — can be added as shares
through the same `ShareClient` surface as a public link.

Watch history syncs through a `proton-stream` device in that Drive: one
`watch-history/<installation>.json` per installation, so no two devices ever
write the same file. Each sync reads the others and merges per episode, newer
`updated_at` wins, with a deterministic tie-break. It runs at launch, after
sign-in, whenever the player closes and every five minutes. A session that can
no longer refresh signs the app out instead of failing on every launch.

The CLI gains `login`, `logout`, `account`, `browse` and `sync`.

Also in this change:
- Android offline downloads no longer look stuck (B64): two transfer at once,
  through a copy stream with no read-ahead, with a smoothed transfer rate.
- Choosing a metadata match by hand now enriches the title too, instead of
  keeping the old match's episodes and artwork.

The catalog schema is unchanged.
2026-10-06 13:06:54 +02:00
nvrl 6cdab2fde1 chore(version): bump to 1.1.3
Patch. Fixes two Windows installer defects: an MSI upgrade no longer leaves
the app without libmpv until a second install (B62), and a taskbar pin keeps
its icon, which the exe now carries itself (B63). The catalog schema and
on-disk data are unchanged from 1.1.2.
2026-10-06 03:05:20 +02:00
nvrl 6239780978 fix(app,packaging): keep libmpv and the taskbar icon across Windows upgrades
An MSI upgrade left the app without libmpv-2.dll until it was installed a
second time (B62). Costing runs before RemoveExistingProducts, saw the old
DLL at the same version and skipped the copy, and removing the old product
then deleted it. Both installer definitions now set REINSTALLMODE=amus;
every file is private to the install directory.

A taskbar pin lost its icon after a while (B63). The exe carried no icon
resource, and the Start Menu shortcut's icon lived in the per-ProductCode
installer cache that each upgrade deletes. build.rs now compiles the .ico
into proton-stream.exe, and the shortcut has no Icon of its own (and in the
WiX build is no longer advertised), so both show the exe's icon.
2026-10-06 03:04:07 +02:00
nvrl 66be35c3d4 chore(version): bump to 1.1.2
Patch. The only change since 1.1.1 is on Android: the primary button on the
library hero no longer draws taller than the button beside it. The catalog
schema and on-disk data are unchanged from 1.1.1.
2026-10-04 16:55:38 +02:00
nvrl e3dcbec1f2 chore(version): bump to 1.1.1
Patch, not minor. Nothing a viewer uses changes: the Android build moves to
NDK r30 and mpv-android 687c7fd, which brings newer harfbuzz, fribidi,
unibreak, fontconfig, libxml2 and curl into the bundled libmpv. The catalog
schema and on-disk data are unchanged from 1.1.0.
2026-10-04 02:54:21 +02:00
nvrl aef182e7e8 chore(version): bump to 1.1.0
Minor, not patch. This release adds features and changes on-disk data:

- ani.zip episode names and fanart.
- Franchise grouping, shelves, poster grid and new sorts.
- Two catalog migrations (v9, v10). Catalogs are forward-only, so 1.0.x
  refuses to open a catalog 1.1.0 has upgraded.

The first match run after upgrading fetches every title's details and
episode list again. It refetches by id and does not search, so
hand-picked matches are kept.
2026-10-04 01:27:40 +02:00
nvrl 52d27ec996 chore(version): bump to 1.0.1 2026-10-03 23:00:34 +02:00
nvrl 7914cf4dc1 chore(version): bump to 1.0.0 2026-10-03 13:35:36 +02:00
nvrl 3b9f4b549c chore(version) bumped to 0.5.1 2026-10-03 12:37:59 +02:00
nvrl 6e09129d0c fixed font loading 2026-10-03 02:03:24 +02:00
nvrl 476fec8c04 chore(VER): bumped 0.5.0 2026-10-02 23:42:13 +02:00
nvrl 3df0644bd8 chore(deps): proton-sdk and proton-drive-rs 0.7.2, lru 0.18
The SDK now pings idle HTTP/2 connections and bounds the connect phase, so
a connection dropped by a NAT or a network switch is replaced within seconds
instead of stalling every request on it until the timeout. It also clamps a
server's Retry-After to two minutes, re-mints expired block URLs on the
whole-file download path as well as the reader, and exposes
ProtonError::is_retriable.

lru follows the SDK to 0.18, so one copy is built instead of two.
2026-10-02 23:42:12 +02:00
nvrl 4d44db0949 feat(app): desktop notifications on Windows
Toasts through WinRT, under the app id io.narl.proton-stream. The id is
registered for the current user under HKCU\Software\Classes\AppUserModelId
with a display name and icon on the first notification of a session, which
is what lets an app with no package or installer-made shortcut show one. If
that write fails, the toast goes out under PowerShell's id rather than not
at all.
2026-10-02 23:27:25 +02:00