Documentation
¶
Overview ¶
Package seriesorder joins a source's episode list to TVDB's aired order through SkyHook's lists of the same series, and keeps the lifecycle of each root's SkyHook evidence, the readings its keys come from, which statedb stores with the root record (media-sources design 4.4).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the aired join and the search read of each root's evidence. A root joins only inside its source's scan loop, so its evidence has one writer at a time; mu never covers a request.
func (*Service) Evidence ¶
func (s *Service) Evidence(ctx context.Context, src media.SourceID, root mediasource.NativeRef) (mediasource.SeriesEvidence, bool, error)
Evidence returns the Bound reading statedb last stored for src's root, the one its keys came from, in one read; false with none. It asks SkyHook nothing, so a title language the reading lacks is absent.
func (*Service) Join ¶
func (s *Service) Join(ctx context.Context, q mediasource.JoinQuery) ([]mediasource.Joined, *mediasource.RootEvidence, error)
Join answers one Joined per listed episode of q, in order, from the newest reading q's list agrees with, and the evidence the root carries after it, fetching first when design 4.4's rules call for it; it writes nothing. Under another order than aired, a list that agrees with no reading is an error wrapping mediasource.ErrAiredOrderUnavailable, with no evidence, as is ctx's deadline passing in the root's read under any order. A store failure is the store's error and a cancelled ctx its error; SkyHook is asked within joinBudget, and a passed deadline, ctx's or the budget's, is a failed fetch.
type Store ¶
type Store interface {
RootEvidence(ctx context.Context, src media.SourceID, root mediasource.NativeRef) (mediasource.RootEvidence, bool, error)
Policy() language.Policy
}
Store is what the service reads; *statedb.Store implements it. Policy is the policy in force, whose targets are title languages of every root.