Documentation
¶
Overview ¶
Package overlays creates truthful, versioned poster variants in pure Go. Quality badges require observed release facts; metadata estimates are never treated as evidence of 4K/HDR/Dolby Vision/Atmos availability.
Index ¶
- type Artwork
- type Facts
- type ImageSource
- type Options
- type Service
- func (s *Service) Artwork(ctx context.Context, key core.RatingKey) (Artwork, error)
- func (s *Service) Backdrop(ctx context.Context, u *core.User, t *core.Title, lang string) ([]byte, string, error)
- func (s *Service) Labels(ctx context.Context, u *core.User, t *core.Title) []string
- func (s *Service) Logo(ctx context.Context, t *core.Title) ([]byte, string, error)
- func (s *Service) Paths(ctx context.Context, u *core.User, t *core.Title, lang string) (string, string)
- func (s *Service) Poster(ctx context.Context, u *core.User, t *core.Title, lang string) ([]byte, string, error)
- func (s *Service) Router(cat core.Catalog, users func(*http.Request, int64) (*core.User, error)) http.Handler
- func (s *Service) SaveArtwork(ctx context.Context, key core.RatingKey, v Artwork) error
- func (s *Service) SaveSettings(ctx context.Context, v Settings) error
- func (s *Service) Settings(ctx context.Context) (Settings, error)
- func (s *Service) Version(ctx context.Context, u *core.User, t *core.Title, lang string) string
- type Settings
- type Variant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageSource ¶
type Options ¶
type Options struct {
Images ImageSource
Allowed func(*core.User, *core.Title) bool
Facts func(context.Context, *core.User, *core.Title) Facts
Ratings *ratings.Service
Taste func(context.Context, *core.User) []string
Now func() time.Time
Variants func(context.Context, *core.Title, string) (Artwork, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Paths ¶
func (s *Service) Paths(ctx context.Context, u *core.User, t *core.Title, lang string) (string, string)
Paths returns owner-approved variants, selected by language and actual tags.
func (*Service) Poster ¶
func (s *Service) Poster(ctx context.Context, u *core.User, t *core.Title, lang string) ([]byte, string, error)
Poster decodes bounded images and uses a bounded generated-image cache.
func (*Service) Router ¶
func (s *Service) Router(cat core.Catalog, users func(*http.Request, int64) (*core.User, error)) http.Handler
Router must be owner authenticated. Previews pass through the same generator as Plex; the caller supplies real catalog titles, never arbitrary image URLs.
func (*Service) SaveArtwork ¶
func (*Service) SaveSettings ¶
Click to show internal directories.
Click to hide internal directories.