Documentation
¶
Overview ¶
Package discovery owns shared discovery enrichment and its bounded worker.
Index ¶
- type ArtworkSelection
- type Features
- func (d *Features) CachedLocalized(t *core.Title, lang string) *core.Title
- func (d *Features) CachedRecap(user *core.User, t *core.Title, state core.State, now time.Time) string
- func (d *Features) PrepareArtwork(ctx context.Context, viewer *core.User, t *core.Title, lang string) (*core.Title, string, error)
- func (d *Features) RenderArtwork(ctx context.Context, viewer *core.User, t *core.Title, kind, lang string) ([]byte, string, error)
- func (d *Features) Run(ctx context.Context)
- func (d *Features) SelectArtwork(ctx context.Context, viewer *core.User, t *core.Title, lang string) ArtworkSelection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtworkSelection ¶
type ArtworkSelection struct {
Title *core.Title
Enabled bool
PosterVersion, BackdropVersion, LogoVersion string
}
ArtworkSelection contains shared selection facts; adapters own image URLs.
type Features ¶
type Features struct {
Watchlist *watchlist.Service
Ratings *ratings.Service
Overlays *overlays.Service
Personal *personalize.Discovery
LLM *llm.Service
Localize func(context.Context, *core.Title, string) (*core.Title, error)
// OverviewTranslate is optional. detail is true only when a viewer opened
// the item. A library row passes false and must not call a model.
OverviewTranslate func(ctx context.Context, t *core.Title, lang string, detail bool) (summary, tagline string, ok bool)
// contains filtered or unexported fields
}
Features is optional. Viewers use these features through ordinary Plex metadata, Home, search and continue-watching endpoints.
func (*Features) CachedLocalized ¶
CachedLocalized queues localization without delaying catalogue enumeration.
func (*Features) CachedRecap ¶
func (*Features) PrepareArtwork ¶
func (d *Features) PrepareArtwork(ctx context.Context, viewer *core.User, t *core.Title, lang string) (*core.Title, string, error)
PrepareArtwork performs bounded localization for an authorized image read. Versioning precedes rendering, so protocol adapters can retain conditional GET.
func (*Features) RenderArtwork ¶
Click to show internal directories.
Click to hide internal directories.