Skip to main content

Overview

Profile types manage user authentication, preferences, settings, and addon configuration.

Profile

Main user profile structure.
auth
Option<Auth>
Authentication information (None if not logged in)
addons
Vec<Descriptor>
required
List of installed addons
addonsLocked
bool
default:"false"
Lock flag raised when addon fetch fails to prevent overwriting user addons with defaults
settings
Settings
required
User settings and preferences

Methods

uid(&self) -> UID

Get the user ID if authenticated, None otherwise.

auth_key(&self) -> Option<&AuthKey>

Get the authentication key if logged in.

has_trakt<E: Env>(&self) -> bool

Check if user has valid Trakt authentication (not expired).

Default Profile

Default profile includes:
  • No authentication
  • Official Stremio addons
  • Unlocked addons
  • Default settings

Auth

Authentication credentials.
key
AuthKey
required
Authentication key (String wrapper)
user
User
required
User information

User

User account information.
id
UserId
required
User ID (serialized as _id)
email
String
required
User email address
fbId
Option<String>
Facebook ID if linked
appleId
Option<String>
Apple ID if linked
avatar
Option<String>
Avatar URL or identifier
lastModified
DateTime<Utc>
required
Last modification timestamp
dateRegistered
DateTime<Utc>
required
Registration date
trakt
Option<TraktInfo>
Trakt integration information
premiumExpire
Option<DateTime<Utc>>
Premium subscription expiry date
GDPR consent information

Methods

is_new_user<E: Env + 'static>(&self) -> bool

Check if user registered within NEW_USER_DAYS.

TraktInfo

Trakt.tv integration credentials.
createdAt
DateTime<Utc>
required
When the token was created
expiresIn
Duration
required
Token expiration duration
accessToken
String
required
Trakt access token (sensitive, not shown in Debug)

GDPRConsent

GDPR consent status.
tos
bool
required
Terms of service consent
privacy
bool
required
Privacy policy consent
marketing
bool
required
Marketing consent
from
Option<String>
Source of consent

Settings

User preferences and application settings.

Interface Settings

interfaceLanguage
String
default:"eng"
Interface language code
hideSpoilers
bool
default:"false"
Whether to hide spoilers
gamepadSupport
bool
default:"false"
Enable gamepad support

Playback Settings

playerType
Option<String>
Preferred player type
bingeWatching
bool
default:"true"
Auto-play next episode
playInBackground
bool
default:"true"
Continue playback in background
hardwareDecoding
bool
default:"true"
Use hardware video decoding
videoMode
Option<String>
Video mode setting
frameRateMatchingStrategy
FrameRateMatchingStrategy
default:"FrameRateOnly"
How to match frame rates (Disabled, FrameRateOnly, FrameRateAndResolution)
nextVideoNotificationDuration
u32
default:"35000"
Duration of next video notification in milliseconds

Audio Settings

audioPassthrough
bool
default:"false"
Enable audio passthrough
audioLanguage
Option<String>
default:"eng"
Preferred audio language
secondaryAudioLanguage
Option<String>
Secondary audio language
surroundSound
bool
default:"false"
Enable surround sound

Subtitle Settings

subtitlesLanguage
Option<String>
default:"eng"
Preferred subtitle language
secondarySubtitlesLanguage
Option<String>
Secondary subtitle language
subtitlesAutoSelect
bool
default:"true"
Automatically select subtitles
subtitlesSize
u8
default:"100"
Subtitle size percentage
subtitlesFont
String
default:"Roboto"
Subtitle font family
subtitlesBold
bool
default:"false"
Bold subtitles
subtitlesOffset
u8
default:"5"
Vertical offset for subtitles
subtitlesTextColor
String
default:"#FFFFFFFF"
Subtitle text color (ARGB hex)
subtitlesBackgroundColor
String
default:"#00000000"
Subtitle background color (ARGB hex)
subtitlesOutlineColor
String
default:"#000000"
Subtitle outline color (RGB hex)
subtitlesOpacity
u8
default:"100"
Subtitle opacity percentage
assSubtitlesStyling
bool
default:"false"
Enable ASS subtitle styling

Control Settings

escExitFullscreen
bool
default:"true"
ESC key exits fullscreen
seekTimeDuration
u32
default:"10000"
Seek duration in milliseconds for arrow keys
seekShortTimeDuration
u32
default:"3000"
Short seek duration in milliseconds (arrow + shift)
pauseOnMinimize
bool
default:"false"
Pause when application is minimized
quitOnClose
bool
default:"true"
Quit application when window is closed

Server Settings

streamingServerUrl
Url
required
Streaming server URL
streamingServerWarningDismissed
Option<DateTime<Utc>>
When streaming server warning was dismissed
serverInForeground
bool
default:"false"
Run server in foreground

Privacy Settings

sendCrashReports
bool
default:"true"
Send crash reports

Type Aliases

UID

pub type UID = Option<UserId>;
User ID - Some when authenticated, None when not authenticated.

UserId

Wrapper around String for type safety.

AuthKey

Wrapper around String for authentication key.

Password

Wrapper around String for passwords (not shown in Debug output).

Build docs developers (and LLMs) love