pub enum Request {
Show 127 variants
Hello(Hello),
AuthMethods,
LoginPassword(LoginPassword),
Ping,
ActivateProfile,
PlaybackProgressSequence {
handle: PlaybackHandle,
},
BeginDeviceSignIn {
remember: bool,
},
AwaitDeviceSignIn {
request: String,
},
BeginPasskeySignIn {
username: Option<String>,
},
FinishPasskeySignIn {
signed: FinishPasskeySignIn,
remember: bool,
},
TrustedProfiles,
ResumeProfile {
user_id: String,
},
RedeemInvite(RedeemInvite),
BeginInvitePasskey(BeginInvitePasskey),
RedeemInviteWithPasskey(RedeemInviteWithPasskey),
LookupInvite(LookupInvite),
BeginPortableSignIn,
FinishPortableSignIn(PortableSignIn),
RedeemPortableInvite(RedeemPortableInvite),
IdentityRecord {
user: PortableUserId,
},
IdentityRecordByHandle {
handle: [u8; 32],
},
OfferPairing(PairingOffer),
FetchPairing {
code: RelayCode,
},
AnswerPairing {
code: RelayCode,
answer: PairingAnswer,
},
CollectPairing {
code: RelayCode,
},
Libraries,
Items {
library: LibraryId,
offset: u32,
limit: u32,
sort: Option<ItemSort>,
filter: Option<ItemFilter>,
},
ItemFilterValues {
library: LibraryId,
},
Item {
id: MediaId,
},
NextEpisode {
item: MediaId,
mode: NextMode,
specials: bool,
},
ShowNext {
show: MediaId,
},
Search(SearchRequest),
PersonItems {
person: PersonId,
offset: u32,
limit: u32,
},
Tracks {
id: MediaId,
},
WhoAmI,
Logout,
ListSessions,
PlaybackPlan {
id: MediaId,
selection: Option<Selection>,
bitmap: BitmapSubtitles,
display: Option<DisplayCapabilities>,
},
StartPlayback {
id: MediaId,
selection: Option<Selection>,
start_ms: Option<u64>,
bitmap: BitmapSubtitles,
quality: Quality,
display: Option<DisplayCapabilities>,
capabilities: Option<ClientCapabilities>,
onward_share: Option<u64>,
},
StopPlayback {
handle: PlaybackHandle,
},
PlaybackRevision {
handle: PlaybackHandle,
},
SeekPlayback {
handle: PlaybackHandle,
position_ms: u64,
},
SetPin {
pin: String,
proof: Option<PinProof>,
},
ClearPin {
proof: PinProof,
},
UnlockProfile {
pin: String,
},
ListDevices,
BeginPasskeyRegistration,
FinishPasskeyRegistration(FinishPasskeyRegistration),
ListPasskeys,
RenamePasskey {
id: String,
name: String,
},
RemovePasskey {
id: String,
},
ConfirmPassword(ConfirmPassword),
ChangePassword(ChangePassword),
BeginConfirmPasskey,
FinishConfirmPasskey(FinishPasskeySignIn),
GetPlexLink,
SetPinRequired {
device: Option<String>,
required: bool,
},
LookupDeviceSignIn {
code: String,
},
ApproveDeviceSignIn {
code: String,
remember: bool,
},
SetDeviceTrust {
device: Option<String>,
trusted: bool,
auto_login: bool,
},
ForgetDevice {
device: String,
},
DenyDeviceSignIn {
code: String,
},
ChangeSubtitle {
handle: PlaybackHandle,
subtitle: Option<u32>,
bitmap: BitmapSubtitles,
position_ms: u64,
display: Option<DisplayCapabilities>,
onward_share: Option<u64>,
},
ChangeQuality {
handle: PlaybackHandle,
quality: Quality,
bitmap: BitmapSubtitles,
position_ms: u64,
display: Option<DisplayCapabilities>,
onward_share: Option<u64>,
},
GetManifest {
handle: PlaybackHandle,
kind: ManifestKind,
variant: u32,
},
ReadSubtitle {
handle: PlaybackHandle,
offset: u64,
version: Option<u64>,
},
ReadSubtitleSegment {
handle: PlaybackHandle,
n: u32,
},
GetPreviews {
id: MediaId,
},
UpdatePlaybackProgress {
handle: PlaybackHandle,
sequence: u64,
position_ms: u64,
},
UpdateWatchProgress {
id: MediaId,
position_ms: u64,
},
MarkWatched {
id: MediaId,
},
MarkUnwatched {
id: MediaId,
},
HideFromContinueWatching {
id: MediaId,
},
UnhideFromContinueWatching {
id: MediaId,
},
Home,
GetTrackPreferences,
SetTrackPreferences {
preferences: TrackPreferences,
},
SetTrackOverride {
id: MediaId,
selection: Selection,
},
ClearTrackOverride {
id: MediaId,
},
TieBegin,
TieFinish {
user: PortableUserId,
proof: TieProof,
},
Untie {
user: PortableUserId,
},
CreateInvite(CreateInvite),
ListInvites,
RevokeInvite {
id: String,
},
HttpPlaybackUrl {
handle: PlaybackHandle,
},
PairServer(PairServer),
ShareLibraries(ShareLibraries),
SetServerRow {
server_id: String,
shown: bool,
},
RedeemPlayToken(RedeemPlayToken),
RemoteHints {
id: MediaId,
},
RemoteGrant {
id: MediaId,
download: Option<String>,
},
SetPlayFrom {
title: MediaId,
from: Option<String>,
},
LeaveServer,
ListPlaylists,
GetPlaylist {
id: String,
offset: u32,
limit: u32,
},
CreatePlaylist {
name: String,
kinds: Kinds,
visibility: Visibility,
},
UpdatePlaylist {
id: String,
name: Option<String>,
kinds: Option<Kinds>,
visibility: Option<Visibility>,
},
EditPlaylist {
id: String,
revision: u64,
edits: Vec<PlaylistEdit>,
},
DeletePlaylist {
id: String,
},
PinPlaylist {
id: String,
position: u32,
},
UnpinPlaylist {
id: String,
},
PlayPlaylist {
id: String,
from: Option<EntryId>,
shuffle: bool,
repeat: Repeat,
skip_watched: bool,
},
NextInPlaylist {
id: String,
after: EntryId,
},
UpcomingInPlaylist {
id: String,
limit: u32,
},
SetPlaylistSettings {
id: String,
shuffle: bool,
repeat: Repeat,
skip_watched: bool,
},
ImportPlexPlaylists {
dry_run: bool,
},
DismissPinNotes,
Like {
items: Vec<MediaId>,
},
Unlike {
items: Vec<MediaId>,
},
ListShareCandidates {
id: String,
query: String,
offset: u32,
limit: u32,
},
RecentlyPlayed {
kinds: Option<Kinds>,
offset: u32,
limit: u32,
},
RemovePlaylistArt {
id: String,
},
SyncSubtitle {
id: MediaId,
track: u32,
},
UseOriginalSubtitleTiming {
id: MediaId,
track: u32,
},
SetSubtitleOffset {
id: MediaId,
track: u32,
offset_ms: i64,
},
SearchSubtitles {
id: MediaId,
language: Option<String>,
},
DownloadSubtitle {
id: MediaId,
result: String,
},
RemoveSubtitleDownload {
id: MediaId,
download: String,
},
DownloadOptions {
id: MediaId,
device: Option<DownloadDevice>,
},
PrepareDownload {
id: MediaId,
source: DownloadSource,
tracks: DownloadTracks,
device: Option<DownloadDevice>,
},
DownloadStatus {
ids: Vec<String>,
},
CancelDownload {
id: String,
},
SyncOfflineWatch {
device_now: i64,
entries: Vec<OfflineWatch>,
},
MusicDownloadChanges {
artists: Vec<MediaId>,
playlists: Vec<String>,
liked: bool,
since: Option<String>,
},
SyncOfflinePlays {
device_now: i64,
plays: Vec<OfflinePlay>,
liked: Vec<OfflineLike>,
},
Unknown,
}Variants§
Hello(Hello)
The first request on every connection.
AuthMethods
LoginPassword(LoginPassword)
Ping
ActivateProfile
Explicit foreground profile selection. Background requests never select a profile.
PlaybackProgressSequence
Last accepted progress sequence for a restored playback handle.
Fields
handle: PlaybackHandleBeginDeviceSignIn
Ask to be signed in by someone approving this device on another
one they are signed in on. Show the code (and its
crate::device_sign_in::link as a QR code), then
AwaitDeviceSignIn. DeviceSignInStarted.
remember asks for this device to be trusted; the
approver sees the request and decides. Never true unless the user
ticked “Remember this device”.
AwaitDeviceSignIn
Wait, up to about 25 s, for request to be approved: LoggedIn
with a session for this device, DeviceSignInPending (ask again),
or DeviceSignInDenied / DeviceSignInExpired. Only the device
that began the request may ask, and one wait at a time: a newer
one ends the one before it with DeviceSignInPending.
BeginPasskeySignIn
Begin signing in with an app passkey (crate::passkeys):
PasskeySignInBegun, a nonce, listing no passkeys (any the
platform finds): anyone can ask. With username, only that user’s
passkeys finish it. The nonce is this device’s, for 5 minutes;
beginning again replaces it. The challenge to sign is
crate::app_passkey_challenge of this server’s id and the nonce.
FinishPasskeySignIn
Finish it with what the passkey signed: LoggedIn, a session for
this device, as LoginPassword gives (its PIN is asked as usual),
and with remember this device trusted, as LoginPassword does.
Anything that does not sign in is InvalidCredentials, counted as
a failed sign-in (then RateLimited).
TrustedProfiles
The users this device is trusted for: TrustedProfiles,
for “Who’s watching” once their sessions have ended. Only this
device’s own; nothing about other devices. Trust that lapsed is
left out.
ResumeProfile
Start a session on this device for user_id (as TrustedProfiles
gives it), without a password: LoggedIn, a normal session bound
to this device, remembered: true. A device that asks for the
user’s PIN gets it locked, as after any sign-in. Unauthenticated,
the same for every reason, when this device is not trusted for
them, the trust lapsed or was removed, or the user is disabled.
The server never resumes a profile by itself: auto-login is the
client resuming the profile marked auto_login at start.
RedeemInvite(RedeemInvite)
Make an account with an invite’s code and sign in to it:
LoggedIn, a session bound to this device as LoginPassword
gives, remembered: false. The account has the invite’s role.
A code that is not one, or whose invite was revoked, is
InviteInvalid, counted as a wrong guess (then RateLimited); one
past its expiry InviteExpired; one with no uses left
InviteExhausted. A username someone has is UsernameTaken, and a
username, display name or password that is not acceptable
InvalidInput; the invite is not used up by either. A device that
is not signed in draws on the sign-in budget all such devices share,
as LoginPassword does.
BeginInvitePasskey(BeginInvitePasskey)
Begin making an account with an invite’s code and an app passkey,
no password (feature spoolframe:october-2026): PasskeyRegistrationBegun, a nonce, as
for BeginPasskeyRegistration, for the account username is to
be. The code and username are checked as RedeemInvite checks
them, with its errors; nothing is made or used up yet. The
registration is this device’s, for 5 minutes, and beginning again
replaces it. On the strangers’ budget, as redeeming is.
RedeemInviteWithPasskey(RedeemInviteWithPasskey)
Finish it with the passkey the platform made (feature
spoolframe:october-2026): the
account is made with the invite’s role, its one way to sign in the
passkey, one use of the invite taken, and the device signed in:
LoggedIn, trusted when remember. Only the device that began it,
with the same code, finishes it, once; otherwise
InvalidCredentials, as a passkey that does not verify is. The
invite is checked again, as RedeemInvite checks it, and a
username taken meanwhile is UsernameTaken; neither uses the
invite up.
LookupInvite(LookupInvite)
What an invite’s code is, before joining with it: InviteLookup,
for the “Got an invite?” screen. Nothing is used up. The code is
taken as RedeemInvite takes it, and counted as it counts one: a
code no invite has (or that cannot be one) is no_match, a wrong
guess (then RateLimited); a revoked, expired or used-up one is
not counted. On the strangers’ budget, as redeeming is.
BeginPortableSignIn
Begin signing in as a portable user with a device credential:
PortableSignInBegun, a nonce for the device key to sign
over (crate::portable::device_proof_message of this server’s
endpoint id and it). The nonce is this device’s, for
expires_in_secs (5 minutes), and is used once, whatever the
finish makes of it; beginning again replaces it. Draws on the
sign-in budget all devices not signed in share.
FinishPortableSignIn(PortableSignIn)
Finish it: LoggedIn, remembered: false, a session
bound to this device. Local-first: where the identity is tied to an
account here the session is that account’s, as any sign-in
to it (its PIN is asked as usual); else, where it has a grant here,
the portable user’s own; else nothing. Every refusal (no grant, a
credential or proof that does not hold, a revoked key, an expired
or missing nonce, a disabled account) is InvalidCredentials,
counted as a failed sign-in (then RateLimited).
RedeemPortableInvite(RedeemPortableInvite)
Redeem a portable-account invite as the portable user
sign_in proves, over the nonce BeginPortableSignIn gave: the
server grants them access (no account is made), uses one of the
invite’s uses, and signs them in as FinishPortableSignIn does:
LoggedIn. Someone granted here already keeps their grant, and
the invite its use.
The code is checked as RedeemInvite checks it (InviteInvalid,
counted as a wrong guess; InviteExpired; InviteExhausted); a
create-user invite’s code is WrongInviteKind, and its use is
kept. The credential is checked as FinishPortableSignIn checks
it: InvalidCredentials, counted.
IdentityRecord
What this server keeps of portable identity user: its
genesis and newest state, IdentityRecord, for a device recovering
the identity with one of its roots. Only an identity known here
(tied or granted) has one; any other is NotFound. Public data,
served to anyone, on the strangers’ budget.
Fields
user: PortableUserIdIdentityRecordByHandle
The record, as IdentityRecord answers it, of the identity whose
genesis handle is handle: what a security key gives back
as its credential’s user handle, for a fresh install that holds a
key and nothing else. A key added to a phrase identity carries the
identity’s id as its handle, so a handle that is the id of a phrase
identity known here answers that identity’s record. Only an
identity known here has one; any other is NotFound. Handles are
32 random bytes, so a miss says nothing. Public data, served to
anyone, on the strangers’ budget.
OfferPairing(PairingOffer)
Hold a device’s pairing request under its relay code, for a
root terminal with no camera to fetch: Done. For
crate::pairing::RELAY_TTL_SECS; offering again from the same
device replaces it. A code another device holds is
InvalidInput. On the strangers’ budget.
FetchPairing
The pairing request held under code: PairingOffered, or
NotFound. On the strangers’ budget, so codes are not guessed.
AnswerPairing
The root terminal’s answer to the request under code:
Done. One answer only, for the key the request named; another,
or no request, is NotFound; a credential for another key
InvalidInput. The server carries it and checks nothing else: the
device does. On the strangers’ budget.
CollectPairing
The answer to this device’s request under code, if one came:
PairingAnswered, taken (the request ends with it) or
None while there is none yet. Only the device that offered it;
any other, or no request, is NotFound. Not on the strangers’
budget: the device asks every few seconds.
Libraries
Items
A page of a library’s top-level items: Items. Without sort and
filter, every item by title, as before them. With either: ordered
by sort, then by sort title and id, and only the items filter
keeps, total counting those. A key or filter part the library
does not have (ItemFilterValues lists what it has), or a value
this build does not know, is InvalidInput.
Fields
filter: Option<ItemFilter>Optional for good: left out, every item.
ItemFilterValues
What library library’s items can be sorted and filtered by:
ItemFilterValues, the genres, years, content ratings, resolutions
and ranges its items have, and the sort keys and filter parts it
applies.
Item
NextEpisode
The episode to play after episode item (feature
spoolframe:october-2026): NextEpisode, filled as Item’s
children are, and None at the show’s end. in_order is the
one right after it; first_unwatched the first after it the user
has not watched. Specials (season 0) are in the order only when
specials, first, as a show lists its seasons; without them, a
special has no episode after it. An episode the user may not see
is None. An item that is not an episode is InvalidInput.
ShowNext
What a show’s Continue goes to (feature
spoolframe:october-2026): NextEpisode, the first episode in
progress, else the first the user has not watched, specials left
out, else None. An item that is not a show is InvalidInput.
Search(SearchRequest)
Scoped, grouped search. Search; for a client that names
the experimental federation feature, SearchHits: this
server’s results and the paired servers’ cache’s, a title found on
several servers once.
PersonItems
The items a person a search found is in, one page at a
time. Items.
Tracks
WhoAmI
Who this request’s session belongs to.
Logout
End this request’s session (and only it). On a trusted device it forgets the device for this user too: the next time is a full sign-in.
ListSessions
The session user’s live sessions on every device.
PlaybackPlan
How the server would play id for this client with these tracks.
Without a selection the server chooses them from the user’s
preferences and says which in the reply.
Fields
bitmap: BitmapSubtitlesHow a picked bitmap subtitle is shown.
display: Option<DisplayCapabilities>What the screen shows now (PGPU-06): its HDR formats and bit
depth, over Hello’s, for this plan. None or left out, Hello’s.
StartPlayback
Plan id and, if it plays directly, open a playback session to
read it through. Without a selection, as for PlaybackPlan.
Fields
start_ms: Option<u64>Where to start, for a converted playback: the encode begins there. Direct play reads from wherever the client likes.
bitmap: BitmapSubtitlesHow a picked bitmap subtitle is shown.
quality: QualityThe quality the viewer chose for it: for the link, at most a bitrate, or the original.
display: Option<DisplayCapabilities>What the screen shows now (PGPU-06): its HDR formats and bit
depth, over Hello’s, for this plan and the playback it starts;
a re-plan without one keeps it. None or left out, Hello’s.
capabilities: Option<ClientCapabilities>What the device that will show it plays, in place of
Hello’s, for this playback and its re-plans: a server that plays
on to one of its own devices (a paired server’s proxy) has the
plan made for that device over its one connection. display
applies over it. Left out, Hello’s.
The share of an uplink the playback goes on over, bits per second: a server that plays it on to its own device (a paired server’s proxy) sends its own, at the start and at each re-plan, and the plan keeps under it as under this server’s own share. Left out, this server’s share alone.
StopPlayback
End a playback now, and any encode for it.
Fields
handle: PlaybackHandlePlaybackRevision
Recover a handle’s configuration revision after reconnecting or reopening an SDK. This does not change the encoder’s epoch.
Fields
handle: PlaybackHandleSeekPlayback
Restart a converted playback’s encode at position_ms:
reads then name the new epoch and start at offset 0.
SetPin
Set or change the session user’s PIN: 4 to 8 digits. Done.
A user with no PIN sets their first with no proof, from a session
that signed in within the last 10 minutes; an older one gets
RecentSignInRequired. A user who has one changes it only with a
PinProof: the current PIN, or the account password when the PIN
is forgotten. Without one it is InvalidInput. A locked session
gets ProfileLocked.
ClearPin
Remove the session user’s PIN, and its requirement on every device,
with a PinProof, checked as for SetPin. Done; also for a
user with no PIN (any PIN passes then).
UnlockProfile
Unlock this session on this connection with the user’s PIN.
Wrong PINs are rate-limited; after 10 in a row the session on this
device is revoked (Unauthenticated): sign in with the password.
Done.
ListDevices
The devices the session user has signed in from. Devices.
BeginPasskeyRegistration
Begin making an app passkey for the session user:
PasskeyRegistrationBegun, a nonce, as for BeginPasskeySignIn.
Needs a session signed in within the last 10
minutes, or RecentSignInRequired: confirm it is the user
(ConfirmPassword, BeginConfirmPasskey) first.
FinishPasskeyRegistration(FinishPasskeyRegistration)
Keep the passkey made for it, in the session that began it: Done.
One that does not verify is InvalidCredentials; a name that is
not 1 to 64 characters InvalidInput (the challenge is not used
up then).
ListPasskeys
The session user’s passkeys, the web UI’s and the apps’, oldest
first: Passkeys.
RenamePasskey
Rename one of them (id from Passkeys): Done. A name that is
not 1 to 64 characters (trimmed) is InvalidInput; an id that is
not one of the session user’s passkeys NotFound.
RemovePasskey
Remove one of them: Done. Needs a session signed in within the
last 10 minutes, or RecentSignInRequired; the user’s last way to
sign in is LastSignInMethod; an id that is not one of their
passkeys NotFound.
ConfirmPassword(ConfirmPassword)
Confirm it is the session user, with their account password, so
that a session signed in long ago may make a change that needs a
recent sign-in (ApproveDeviceSignIn, BeginPasskeyRegistration,
RemovePasskey, SetPinRequired with required: false):
Confirmed, and this session counts as signed in now, for 10
minutes. Only this session; the user’s others are as they were.
Checked as LoginPassword checks it: a wrong one is a failed
sign-in for the user’s username from this device
(InvalidCredentials, then RateLimited, one limit with
LoginPassword and the web UI’s confirmation). A user with no
password gets NoPassword, with nothing counted: confirm with an
app passkey. A locked session gets ProfileLocked. The PIN is
never a confirmation: it guards switching profiles on a shared
device, and is weaker than a sign-in.
ChangePassword(ChangePassword)
Change the session user’s password: Done. current_password is
checked as LoginPassword checks it (a wrong one is
InvalidCredentials, counted towards the same limit). A
new_password the server does not take, or the same as the current
one, is InvalidInput. Every other session of the user’s ends, on
the web and on devices. The way out of a session a one-time
password opened (PasswordChangeRequired): this session may then
do anything again. A user with no password gets NoPassword: set
one in the web UI. Not for a portable user (NotForPortableUsers).
BeginConfirmPasskey
Begin confirming it is the session user with one of their app
passkeys: PasskeySignInBegun, a nonce as for
BeginPasskeySignIn, listing their app passkeys only. The nonce is
this session’s on this device, for 5
minutes; beginning again replaces it. A user with no app passkey
gets NotFound; one whose passkey sign-ins are limited
RateLimited. A locked session gets ProfileLocked.
FinishConfirmPasskey(FinishPasskeySignIn)
Finish it with what the passkey signed: Confirmed, as for
ConfirmPassword. A passkey that is not the session user’s, a
challenge that is not this session’s, or anything else that does
not verify is InvalidCredentials, counted as a failed passkey
sign-in (then RateLimited).
GetPlexLink
The session user’s Plex account link: PlexLink. Read
only; a client links or unlinks by opening <web_url>/profile.
SetPinRequired
Ask for the session user’s PIN on device (an endpoint id from
Devices; this device if left out), or stop asking. A locked
session cannot ask this (nor anything but WhoAmI and
UnlockProfile). Stopping the requirement needs recent authentication.
Done.
LookupDeviceSignIn
Which device shows sign-in code code, to ask the user
before approving it. DeviceSignInRequest; NotFound for a code
that is not pending (guesses are rate-limited).
ApproveDeviceSignIn
Sign the device showing code in as the session user. Done.
Requires recent authentication; an old session cannot mint a fresh one.
remember: the approver’s answer to the device’s request to be
trusted (DeviceSignInRequest::remember). The device is
trusted only if it asked and this is true; this cannot trust a
device that did not ask.
SetDeviceTrust
Trust device (an endpoint id from Devices; this device if left
out) for the session user, or stop. Done.
- Turning trust on, or auto-login on, works for this device only
(
InvalidInputfor another: trust another device from the web UI), and needs a recent sign-in (RecentSignInRequired). - Auto-login needs trust (
InvalidInputwithout). It turns auto-login off for the device’s other users, and the PIN requirement off for this user there. - Turning trust off works for any of the user’s devices, and ends the user’s sessions there, this one too if it is this device. For another device it needs a recent sign-in; for this one it needs only the session.
- A device that is not the user’s is
NotFound.
ForgetDevice
Delete one of the session user’s other devices: device
is an endpoint id from Devices. Done. The user’s sessions
there are deleted, and with them its trust and PIN requirement; it
leaves Devices, and if it signs in again it is listed as new.
Other users’ sessions on that device are kept.
- Always needs a recent sign-in (
RecentSignInRequired). - This device is
InvalidInput: sign out withLogout. - A device that is not the user’s is
NotFound.
DenyDeviceSignIn
Refuse it: the device stops waiting. Done.
ChangeSubtitle
Pick another subtitle (or none) for a playing playback: it
is planned again with the same audio. A plan that plays directly
only changes what ReadSubtitle gives; a converted one restarts its
encode at position_ms as a new epoch, from offset 0 (a burned-in
subtitle is in the picture). PlaybackChanged; CannotPlay leaves
the playback as it was.
Fields
handle: PlaybackHandlebitmap: BitmapSubtitlesdisplay: Option<DisplayCapabilities>What the screen shows now (PGPU-06), over Hello’s, for this
plan and the playback from then on. None or left out, what the
playback started with.
The share of an uplink the playback goes on over, bits per second: a server that plays it on to its own device (a paired server’s proxy) sends its own, at the start and at each re-plan, and the plan keeps under it as under this server’s own share. Left out, this server’s share alone.
ChangeQuality
Plan a playing playback again for quality: the viewer
chose another, or, with Auto, the device found its link too slow
for a direct play that stalls. The same tracks, and bitmap as
ChangeSubtitle takes it. A plan that changes restarts at
position_ms as a new epoch, from offset 0, as ChangeSubtitle
does; one that does not is answered as it is, nothing restarted.
PlaybackChanged.
Fields
handle: PlaybackHandlebitmap: BitmapSubtitlesdisplay: Option<DisplayCapabilities>What the screen shows now (PGPU-06), over Hello’s, for this
plan and the playback from then on. None or left out, what the
playback started with.
The share of an uplink the playback goes on over, bits per second: a server that plays it on to its own device (a paired server’s proxy) sends its own, at the start and at each re-plan, and the plan keeps under it as under this server’s own share. Left out, this server’s share alone.
GetManifest
A converted playback’s HLS playlist.
ReadSubtitle
The selected external subtitle of a playback, one chunk of it.
One the server reads as text answers
SubtitleNotReady until it is done: ask again.
The reply is SubtitleChunk: at most SUBTITLE_CHUNK bytes of
the file from offset, total, the file’s length, and version,
which names the file as it was when the chunk was read. Ask from
the end of each chunk, with the first chunk’s version, until
total bytes are read; an offset at or past the end answers no
bytes. When the file is no longer the one version names, the
answer is SubtitleChanged: the chunks read so far are of a file
that is gone, so start again from 0. The first read has no file
to hold the server to, and sends no version.
ReadSubtitleSegment
Segment n (from 1) of an HLS playback’s subtitle rendition:
Subtitle { format: WebVtt, .. }, the cues over that segment’s time,
timed with X-TIMESTAMP-MAP to the video. SubtitleNotReady while
the subtitle is made.
GetPreviews
The frame previews of a movie or episode, for scrubbing:
Previews, PreviewsNotReady while the server makes them (asking
puts the item first in line; ask again in a few seconds, and show
the time alone meanwhile), or NoPreviews.
UpdatePlaybackProgress
Where playback of a movie or episode has got to. Send it now and then while playing and on pause or stop; the server decides what is written, and when.
UpdateWatchProgress
Experimental (federation): where the user got to in id,
a paired server’s (fed:) movie or episode, which plays from that
server rather than from a playback of this one’s: Done. Sent to
the user’s own server, as UpdatePlaybackProgress would be, now and
then while playing and on pause or stop; the server decides what is
written, and when. The paired server keeps nothing of it. An id
that is not a paired server’s is InvalidInput; one no longer
available is NotFound. Unsupported unless this connection’s
Hello named the feature.
MarkWatched
MarkUnwatched
HideFromContinueWatching
Remove the card id, a movie or an episode, from the session
user’s Continue watching or Next up, leaving its progress
and watched state. Only that card: never the episode’s whole show.
id is the card’s own, not its show’s. Playing or marking it again
brings it back. Done.
UnhideFromContinueWatching
Undo a hide (an “Undo” toast). Done.
Home
The session user’s home screen.
GetTrackPreferences
How the session user wants tracks chosen.
SetTrackPreferences
Replace them, for every device of the user.
Fields
preferences: TrackPreferencesSetTrackOverride
Use the tracks of selection in id for the rest of its series
(an episode) or for it (anything else), by language and role. No
subtitle in selection means subtitles off.
ClearTrackOverride
Back to the preferences for id’s series or for it.
TieBegin
Begin tying the session user’s account to a portable identity:
TieChallenge, a nonce for the identity to sign over
(crate::portable::tie_message). The nonce is this session’s,
for its user, for expires_in_secs (5 minutes), and is used once,
whatever TieFinish makes of it. Needs a session signed in within
the last 10 minutes, or RecentSignInRequired. An account may be
tied already: it ties any number of identities.
TieFinish
Tie the session user’s account to user, with proof that user
signed the tie message over the nonce TieBegin gave: by the root,
or by a device key with a credential for user that holds and is
not revoked by any identity state this server has seen. Done.
Needs a recent sign-in, as TieBegin. A nonce that is not this
session’s, is used or is over is TieChallengeExpired: begin
again. A proof that does not hold is InvalidCredentials. An
identity tied to another account here is PortableIdTaken; one
tied to this account already is Done, changing nothing (its
first tie date stands). The account’s other ties stay.
Nothing about the account moves: the tie is a link beside it.
Untie
Sever the session user’s tie to user: Done.
Only that link goes; the account’s other ties, its sessions (those
opened with user’s credential too), passkeys and watch state stay
as they are. Needs a recent sign-in. No tie to user on this
account is NotFound.
Fields
user: PortableUserIdCreateInvite(CreateInvite)
Make an invite (crate::invite_admin), as the web UI’s
inviteCreate does, with its limits: InviteCreated, the code
shown this once. An admin’s only (AdminRequired), and only after
they confirmed it is them recently (RecentSignInRequired: confirm
with ConfirmPassword or a passkey, then ask again). A
federation invite is InvalidInput unless this connection’s
Hello named the experimental federation feature and the server
has it on, as are fields out of their limits.
ListInvites
The invites that can still be redeemed, newest first, made here or
in the web UI: Invites. An admin’s only; no confirmation needed.
RevokeInvite
Revoke invite id: its code stops working, and what it made stays.
Done. An admin’s only, after a recent confirmation, as
CreateInvite. One that is not live (revoked, expired, used up, or
none) is NotFound.
HttpPlaybackUrl
Experimental (http-playback; see crate::experimental):
an HTTP URL for one of this session’s playbacks, for a player with
no Iroh (AirPlay first): HttpPlaybackUrl, or
HttpPlaybackRefused with why not. Refused as Off unless this
connection’s Hello named the feature and the server’s answer
named it back. The URL is
http://<address>:<port>/<token>/master.m3u8 for HLS, .../file
for direct play, its token unguessable and bound to this playback:
it works until the playback ends or is stopped, or nothing asks for
it for a while. Asked again, it may be the same URL. A newer
server may change or drop this.
Fields
handle: PlaybackHandlePairServer(PairServer)
Experimental (federation; see crate::federation): pair
this server with the one whose federation invite link is, as an
admin pasting it in the web UI would: ServerPaired. Unsupported
unless this connection’s Hello named the feature and the
server’s answer named it back. An admin’s only (AdminRequired),
after a recent confirmation (RecentSignInRequired), as
CreateInvite. A link that is not one, has no code, or is this
server’s own is InvalidInput; the other server’s refusal of the
code is the invite’s own error (InviteInvalid, InviteExpired,
InviteExhausted, WrongInviteKind, RateLimited), any other is
PairingRefused; the other server unreachable is Unavailable.
Look the code up on the other server first (LookupInvite): it
tells the kind, the inviter and the key’s fingerprint.
Experimental (federation; see crate::federation):
share libraries of this server with a paired one, as the app offers
once PairServer paired them: LibrariesShared. Every user of the
paired server may browse and watch them; a library shared already
stays shared. Unsupported unless this connection’s Hello named the
feature and the server’s answer named it back. An admin’s only
(AdminRequired), after a recent confirmation
(RecentSignInRequired), as PairServer. A server not paired is
NotFound; a library this server does not serve is InvalidInput,
and then none is shared.
SetServerRow
Experimental (federation): show or hide paired server
server_id’s own row on the user’s Home (HomeScreen::servers):
Done. Kept per user and server; a server’s items stay in Continue
watching either way. Unsupported unless this connection’s Hello
named the feature.
RedeemPlayToken(RedeemPlayToken)
Experimental (federation; see crate::federation):
redeem a play token a paired server got from this one for one of
its users: PlayTokenRedeemed, a session for that one item’s
playback. Pre-auth, on the strangers’ budget as a sign-in is. The
token works once, from the endpoint it was minted for, while its
pair and the library’s share are live; every failure is
Unauthenticated, and the device asks its home server for a new
token. The session reaches StartPlayback of that item and its own
playback’s controls and reads; anything else is Unauthenticated.
A download token is redeemed the same way: its session
reaches that item’s download alone (DownloadOptions,
PrepareDownload, DownloadStatus, CancelDownload, the
Download read and DownloadChanged), or, for a device’s token,
its one download’s read and status. It lives while the download is
made and read, and ends at its CancelDownload.
Unsupported unless this connection’s Hello named the feature.
RemoteHints
Experimental (federation): where the paired server that
id, a fed: item, is from may be dialled (RemoteHints), and
whether this server holds a connection to it now. The device dials
it with a short budget and asks RemoteGrant once it reached it; it
plays id from this server otherwise. An id that is not a paired
server’s is InvalidInput; one not available here is NotFound.
Unsupported unless this connection’s Hello named the feature.
RemoteGrant
Experimental (federation): vouch for the session’s user to
the paired server id is from, for a play token bound to this
device (RemoteGranted), which it redeems there
(RedeemPlayToken). Each play asks its own. With that server
offline, OriginOffline at once: play id from this server. A
portable guest is NotForPortableUsers; an item not shared, or not
a paired server’s, NotFound; that server unable to answer now,
Unavailable. A proxied play asks for no grant: it is a
StartPlayback of id here. Unsupported unless this connection’s
Hello named the feature.
With download, the id of a download of id this server keeps:
a download token instead, bound to this device and to that
one download, which reads it on the paired server
(RemoteGranted::download names it there). A download that is not
the user’s, or not of id, is NotFound.
SetPlayFrom
Experimental (federation): play the title title (any
copy’s id) from paired server from, or from this server with
None: Done. Remembered for the user by the title’s external
ids, so every copy of it, here or on a paired server, plays from
there (SearchHit::play_from, Copies::play_from) while that
server has one. A title with no external ids has one copy:
InvalidInput. A server not paired, or an item not found, is
NotFound. Unsupported unless this connection’s Hello named the
feature.
LeaveServer
Leave this server: Done, and every session of the user
here is ended, this one too. Needs a recent sign-in
(RecentSignInRequired): a local user confirms with
ConfirmPassword or a passkey; a portable user signs in
with its credential again, which opens a new session that counts as
recent. What leaving does depends on who:
- A portable user’s grant is taken away, and its data here (watch state, hidden rows, track preferences) is deleted. Coming back takes a new invite.
- A local account is set aside, not deleted: disabled and marked as left, its sessions ended and its devices no longer trusted; its data stays, and an admin can restore it.
The last enabled admin (or the last with a password) cannot leave:
LastAdmin. Nothing was changed then.
ListPlaylists
Playlists (feature spoolframe:playlists): every playlist
the session user sees, theirs, shared with them and server-wide,
each with whether it is pinned and where; and the notes of pinned
ones that left their Pinned. Playlists.
GetPlaylist
One playlist and a page of its entries, from offset, at most
limit (200): Playlist. Items the user may not see are neither
listed nor counted; an item whose file cannot be read now is
listed as unavailable. One they do not see is NotFound.
CreatePlaylist
Make a playlist the session user owns: PlaylistInfo. A name is 1
to 100 characters; kinds ticks at least one. ServerWide is an
admin’s only (AdminRequired); a share naming someone who is not a
user here is InvalidInput.
UpdatePlaylist
Rename a playlist, widen its kinds (never narrow them:
InvalidInput), or change who sees it: PlaylistInfo. None
leaves each as it is. Its owner’s, or any admin’s for a
server-wide one; anyone else who sees it gets PlaylistReadOnly.
Whoever no longer sees it is sent PlaylistGone, and loses its pin
with a note.
EditPlaylist
Change a playlist’s entries, as seen at revision: PlaylistEdited
with its new revision. 1 to 100 edits, applied in order, all or
none. Made on an older revision, the edits are redone on the newer
one unless one removes or moves an entry changed since:
PlaylistConflict (“Someone changed this playlist; reload”). An
item of a kind the playlist does not take is KindNotAllowed. A
read-only share gets PlaylistReadOnly.
DeletePlaylist
Delete a playlist: Done. Its owner’s, or any admin’s for a
server-wide one. Whoever had it pinned gets a note.
PinPlaylist
Pin a playlist the session user sees to their Pinned at position
(0 first; past the end, last), or move it there: Done. Every
device of theirs is sent PinsChanged.
UnpinPlaylist
Take a playlist out of their Pinned: Done, also when it was not
there.
PlayPlaylist
Start or go on playing a playlist: PlaylistItem, the entry to
play, or PlaylistFinished when nothing is left to play. With
from, that entry (or the next playable one after it); without,
the user’s place: the entry they were in, if they had not finished
it, else the one after it; with no place, the top. The settings are
kept for the user and playlist, for NextInPlaylist and the next
time. Unavailable entries, and with skip_watched watched ones,
are passed. The client plays the item itself (StartPlayback),
skipping its credits, and records progress as any playback does.
NextInPlaylist
What plays after entry after ended or was skipped:
PlaylistItem, or PlaylistFinished at the end with repeat off,
which clears the place so the next PlayPlaylist starts at the
top. The server keeps the place.
UpcomingInPlaylist
What plays next, without playing it (spoolframe:playlist-upcoming):
PlaylistUpcoming, at most limit (100) entries after the session
user’s place, each the one NextInPlaylist would give after the
one before. The round’s order while shuffling, else the playlist’s;
from the start again with repeat all; with repeat one, the place’s
entry alone. With no place, from the top. Unavailable entries, and
with skip_watched watched ones, are passed. Whoever sees the
playlist. Only from a client that listed the feature; from any
other, Unsupported.
SetPlaylistSettings
Keep how the session user plays a playlist, playing nothing
(spoolframe:playlist-upcoming): Done. The place and the shuffled
round stay. Shuffle turned on shuffles anew, from the place, so the
whole playlist is ahead; turned off, the playlist’s order, from the
place. Whoever sees the playlist. Only from a client that listed
the feature; from any other, Unsupported.
ImportPlexPlaylists
Import the session user’s Plex playlists, once: each video
or music playlist of their linked Plex account, on every Plex
server here, becomes a personal playlist of theirs, its items
mapped to this server’s: PlexImport, what was made and what did
not map. Nothing is synced afterwards. With dry_run, nothing is
made. Without a linked Plex account, NotFound; a portable user
has none (NotForPortableUsers). Imported twice, made twice.
DismissPinNotes
Forget the notes ListPlaylists gave: a client showed them.
Done. Notes are per user, not per device.
Like
Like tracks or albums: their tracks go to the top of the
session user’s Liked, in the order given, an album’s in disc and
track order; a track liked already stays where it is. An album
likes the tracks it has now: one added to it later is not liked.
PlaylistInfo, Liked as it is now. 1 to 100 items; anything but
a track or an album is KindNotAllowed, an item not here
NotFound. Liked again, nothing changes. Only from a client that
listed spoolframe:liked; from any other, Unsupported.
Unlike
Take tracks, or every track of albums, out of the session user’s
Liked: PlaylistInfo, Liked as it is now. As Like
takes them; one not liked is no change.
Whom playlist id can be shared with: ShareCandidates, a page
from offset, at most limit (200), by display name. Every
enabled account here and every portable user granted access, but
the session user; with a query, only those whose display name or
username holds it, in any case (empty: everyone). Only whoever
manages the playlist asks: anyone else who sees it gets
PlaylistReadOnly, one who does not NotFound. Only from a client
that listed spoolframe:playlist-sharing; from any other,
Unsupported.
RecentlyPlayed
What the session user played lately: Items, each item
once, by its latest counted play, newest first; a page from
offset, at most limit (500), and how many in all. kinds keeps
films, episodes or tracks only; None, every kind. An item gone
from the library is left out of the page. Each item’s
PlaybackState has its play_count and last_played_at. Only
from a client that listed spoolframe:play-history; from any
other, Unsupported.
RemovePlaylistArt
Take away a playlist’s uploaded cover: PlaylistInfo, its
artwork the mosaic again. Whoever may edit its entries may, as
they may upload one (SetPlaylistArt, a resource request); anyone
else who sees it, and anyone at all for Liked and All, gets
NotAllowed. One without a cover is no change. Only from a client
that listed spoolframe:playlist-art; from any other,
Unsupported.
SyncSubtitle
Sync item id‘s subtitle track (its place in Tracks’
subtitles) to the file, in the background: an external
text subtitle (SRT, WebVTT, ASS) only. SubtitleTiming, its state
Syncing (a track already syncing is left to it); the outcome comes
as SubtitleTimingChanged, or in Tracks asked again. The track
is served as it was until the sync is done, then synced; a sync
that scores too low is not used (Uncertain). Anyone who can play
the item may. Another track is InvalidInput, a track the item
does not have NotFound. Only from a client that listed
spoolframe:subtitle-sync; from any other, Unsupported.
UseOriginalSubtitleTiming
Serve item id’s subtitle track with its original timing again,
for everyone: the sync is set aside, the offset kept.
SubtitleTiming. As SyncSubtitle for who may and which tracks.
SetSubtitleOffset
Move item id’s subtitle track by offset_ms (positive: later)
on top of its timing, for everyone; 0 resets it. At most
ten minutes either way (InvalidInput). The track records who set
it and when. SubtitleTiming. As SyncSubtitle for who may and
which tracks.
SearchSubtitles
Search the subtitle sites the admin turned on (OpenSubtitles,
SubDL, or both) for item id’s subtitles in language (an ISO
639-1 code such as en, or pt-BR), or, with none, in the
languages the server offers first. Both sites are asked at
once and their results are one list, SubtitleResults, best
first: those found by the file’s hash (made for this release), then
the rest by rating and downloads, machine-translated and AI-made
after people’s, ones removed before as bad last; its sources say
how each site’s part went. Kept a day per site, item and language.
Anyone who can play the item may. NoSubtitleSource when the
server has none set up. When every site failed, the first one’s
error: Unavailable when it cannot be reached, RateLimited when
it asks to wait, QuotaExhausted when it is out. Only from a client
that listed spoolframe:subtitle-search; from any other,
Unsupported.
DownloadSubtitle
Download result result (SubtitleResult::id) of a search for
item id, from the site that found it: the
item gains an external subtitle track for everyone, usable at once
(SubtitleDownloaded). One not found by the file’s hash is synced
in the background (spoolframe:subtitle-sync). The same result
downloaded again gives the same track, at no cost. NotFound for a
result no search of the item listed lately (search again);
NotAllowed for a user the admin took downloads from;
QuotaExhausted when the server’s account or the user’s own daily
limit is used up; InvalidInput for a file that is not a subtitle
the server reads. Otherwise as SearchSubtitles.
RemoveSubtitleDownload
Remove item id’s downloaded subtitle download
(SubtitleDownload::id), for everyone: its files go, and
the result is listed last in the item’s searches, marked rejected.
The one who downloaded it, or an admin, may: NotAllowed for
anyone else. Done; a download already removed is Done too.
DownloadOptions
What the device may download of film or episode id
(spoolframe:downloads): DownloadOptions, its tracks, the choice
to show first, the profiles, what original quality would be, and
the subtitles a download would leave out. Anyone who can play the
item may ask. Only from an iPhone, iPad, Mac or Linux client
(Hello.platform); from any other, and from a client that did not
list the feature, Unsupported. With spoolframe:music-downloads
too, id may be a track: its one audio track, no
profiles, and what original would be.
device is read only from a paired server playing its user’s part
(a download token’s session): the device the download is
for, in place of the connection’s Hello.
PrepareDownload
Prepare a download of film or episode id from source with
tracks: Download, its id and state. The same user’s
same request is the same id, ready at once when its file is; one
that failed is tried again. The file is made in the background;
DownloadChanged tells its state as it moves. A track the item
does not have, or a source or choice this build does not know, is
InvalidInput; a profile not there NotFound. As
DownloadOptions for who may and from where. A track (with
spoolframe:music-downloads) takes original or aac256, and
tracks is not read; a film or an episode is refused aac256.
device as for DownloadOptions.
DownloadStatus
The session user’s downloads ids: Downloads, those
they have in order, and in gone each id they have not (never
theirs, cancelled, or no longer kept), so one such id never fails
the rest; at most crate::downloads::MAX_ASKED ids.
CancelDownload
Cancel download id, as the device also does once it has
the file whole and its SHA-256 checked: Done. Its file goes once
no download names it and no one reads it; one being made stops. An
id that is not the session user’s, or was cancelled, is NotFound.
SyncOfflineWatch
Where the device got to in films and episodes while it had no
server (spoolframe:downloads): OfflineWatchSynced, an
outcome per entry, in order. device_now is the device’s clock
now, in Unix seconds: each entry’s at is moved by the difference
to the server’s clock, and kept no later than now. An entry is
written only when it is newer than what the server has (newest
wins, whichever device it came from); watched is judged by the
server’s rules from the position and the item’s credits, or taken
from watched: true. At most crate::downloads::MAX_ASKED
entries; one with neither a position nor watched is
InvalidInput. As DownloadOptions for from where.
MusicDownloadChanges
What the music downloads a device follows hold now
(spoolframe:music-downloads with spoolframe:downloads):
MusicDownloadChanges, one change per artist, per playlist, then
Liked, in that order, and a cursor to ask with next time. With
since, the cursor of the last answer, each thing that holds the
same tracks is unchanged; else, and with no cursor, its tracks
now, in full, for the device to compare with what it keeps. A
cursor this server cannot read is no cursor. Asked each time the
device reaches the server. At most
crate::downloads::MAX_FOLLOWED artists and playlists together;
an id that is not an artist, or All, is InvalidInput; Liked
needs spoolframe:liked too (Unsupported without). Only the
tracks the user may see. As DownloadOptions for from where.
SyncOfflinePlays
What the device played and liked while it had no server
(spoolframe:music-downloads): OfflinePlaysSynced, an outcome per
play and per like, in order. device_now is the device’s clock
now, in Unix seconds: each at is moved by the difference to the
server’s clock, and kept no later than now. Each play of a track is
recorded once, counted as the server’s rules say from
played_ms: it is in play counts and last played. A like or an
unlike is made only when newer than the track’s last change on the
server (newest wins, whichever device made it); likes need
spoolframe:liked too (Unsupported without). At most
crate::downloads::MAX_ASKED plays and likes together. As
DownloadOptions for from where.
Unknown
A request type this build does not know; answered with
Error::Unsupported.