Documentation
¶
Overview ¶
Package episodeorder provides presentation-only TV ordering. Canonical TMDB keys and season/episode identity never change, including during playback.
Index ¶
- type Preference
- type Service
- func (s *Service) Children(ctx context.Context, u *core.User, k core.RatingKey) ([]core.Title, error)
- func (s *Service) Get(ctx context.Context, u *core.User, k core.RatingKey) (*core.Title, error)
- func (s *Service) Grandchildren(ctx context.Context, u *core.User, k core.RatingKey) ([]core.Title, error)
- func (s *Service) Grouped(ctx context.Context, u *core.User, shows []core.RatingKey) (map[core.RatingKey]bool, error)
- func (s *Service) Position(ctx context.Context, u *core.User, k core.RatingKey) (season, episode int, name string, ok bool)
- func (s *Service) Preference(ctx context.Context, user int64, show core.RatingKey) (Preference, error)
- func (s *Service) Reset(ctx context.Context, user int64, show core.RatingKey) error
- func (s *Service) Router() http.Handler
- func (s *Service) Save(ctx context.Context, user int64, show core.RatingKey, p Preference) error
- func (s *Service) SetBus(bus clusterbus.Bus)
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Preference ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Grandchildren ¶
func (*Service) Grouped ¶ added in v0.2.4
func (s *Service) Grouped(ctx context.Context, u *core.User, shows []core.RatingKey) (map[core.RatingKey]bool, error)
Grouped reports which of the shows present an alternate episode group to the viewer: their own preference, else the owner's default. A show without one keeps the canonical season tree, so a list can render it from the catalogue without loading its layout title by title.
func (*Service) Position ¶
func (s *Service) Position(ctx context.Context, u *core.User, k core.RatingKey) (season, episode int, name string, ok bool)
Position returns only presentation fields, leaving the catalogue title intact.
func (*Service) Preference ¶
func (*Service) Router ¶
Router is mounted behind owner authentication. Viewer zero is the owner default; a positive viewer is an explicit override, including aired order.
func (*Service) SetBus ¶
func (s *Service) SetBus(bus clusterbus.Bus)
SetBus connects the cluster bus (nil disconnects): preference changes on any node drop every node's cached episode layouts.