seriesorder

package
v0.10.0-dev.49 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

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 New

func New(sky *skyhook.Client, store Store, log *slog.Logger) *Service

New is the service over sky and store; a nil log is slog.Default.

func (*Service) Evidence

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

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.

Jump to

Keyboard shortcuts

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