Skip to main content

Crate media_tools

Crate media_tools 

Source
Expand description

Media discovery and recommendation domain for EME.

This crate owns provider-independent media concepts, personal and family media profiles, preferences, viewing activity and recommendation context. Provider adapters, persistence and agent-tool integration are layered on top.

EME identity and family membership remain owned by agent-storage and the host application. Every EME user can have a personal media profile without joining a family; family-managed profiles remain available for household use.

Structs§

ContentRestrictions
Restrictions applied before recommendation ranking, not soft preferences.
ExternalId
External catalogue identifier, namespaced by provider.
FamilyMediaPreferences
Shared household taste that contributes to every family recommendation.
MediaConfig
Media feature defaults loaded by the host application.
MediaExternalConnectionLink
Link from a media profile to a credential stored by agent-storage.
MediaItem
Provider-independent movie or TV catalogue entry.
MediaItemId
EME-owned identifier for a media item.
MediaProfile
A media profile belongs either to an EME user or to a family.
MediaProfileId
Identifier for a media profile, independent of EME user identity.
MediaRating
Rating recorded by a profile, normalized to a five-point scale.
MediaRecommendation
One ranked candidate with the evidence used to recommend it.
MediaStore
SQLite-backed persistence for media data.
MediaToolServices
Dependencies shared by the registered media tools.
MediaWatchEvent
A source-attributed viewing event.
MediaWatchlistItem
A watchlist entry with provider provenance.
PendingTraktLink
Pending profile association carried through a provider OAuth callback.
ProfilePreferences
User-maintained preferences; synchronized viewing activity is not stored here.
ProviderSyncState
Provider activity cursor and last successful synchronization timestamp.
RecommendationContext
Context is data, not an authorization grant; the server must validate family ownership.
RecommendationCriteria
Optional filters supplied for a recommendation request.
RecommendationService
Deterministic discovery, filtering and ranking over the configured providers.
RecommendationWeights
Independent weights for shared family preferences and selected profile signals.
StreamingOffer
Availability offer returned by a provider adapter.
TmdbClient
Client for TMDB movie and television catalogue endpoints.
TmdbPage
TMDB catalogue page normalized into EME media items.
TraktAuthorization
URL and expiry for a pending Trakt consent flow.
TraktOAuthConfig
OAuth application credentials and Trakt API endpoints.
TraktOAuthService
A Trakt OAuth account-linking and credential service.
TraktSyncService
Incremental, profile-scoped Trakt data synchronization.
TraktSyncSummary
Summary of data imported by one profile sync.
TraktTokenManager
Cached short-lived access tokens; refresh tokens remain in agent-storage only.
WatchmodeClient
WatchmodeSource
A Watchmode source/service discovered from the provider’s reference API.

Enums§

HistoryCompleteness
Completeness is distinct from whether a particular title was watched.
MediaConfigError
Invalid media configuration.
MediaKind
A movie or episodic television series.
MediaStoreError
Failures returned by the media SQLite store.
OfferType
How a title can be accessed from a streaming provider.
RecommendationError
StreamingService
Streaming services that may be configured as household subscriptions.
TmdbError
Errors returned by the TMDB adapter.
TraktError
TraktSyncError
WatchHistorySource
System that supplied a viewing event or rating.
WatchedPolicy
How a recommendation treats watched titles across its selected participants.
WatchmodeError
Errors returned by the Watchmode adapter.

Functions§

filter_subscription_offers
Keep only offers matching the household’s configured subscriptions.
register_media_tools
Register the complete media tool surface in the agent’s executable registry.