Help us shape the future of Go! Take the 2026 Go Developer Survey

discovery

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package discovery owns shared discovery enrichment and its bounded worker.

Index

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

func (d *Features) CachedLocalized(t *core.Title, lang string) *core.Title

CachedLocalized queues localization without delaying catalogue enumeration.

func (*Features) CachedRecap

func (d *Features) CachedRecap(user *core.User, t *core.Title, state core.State, now time.Time) string

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

func (d *Features) RenderArtwork(ctx context.Context, viewer *core.User, t *core.Title, kind, lang string) ([]byte, string, error)

func (*Features) Run

func (d *Features) Run(ctx context.Context)

Run is the sole metadata background worker, bounded and stopped with the app.

func (*Features) SelectArtwork

func (d *Features) SelectArtwork(ctx context.Context, viewer *core.User, t *core.Title, lang string) ArtworkSelection

SelectArtwork never waits for localization or remote catalogue/image work.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL