metadata

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrShowNotFound = errors.New("show not found")

ErrShowNotFound is returned when a show lookup yields no results (HTTP 404 or empty response).

Functions

This section is empty.

Types

type Provider

type Provider interface {
	EpisodesInSeason(ctx context.Context, title string, seasonNumber int) (int, error)
}

Provider looks up episode counts from an external metadata source.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service orchestrates metadata lookups across configured providers with caching.

func NewService

func NewService(tvdbAPIKey, tvdbPIN string) *Service

NewService creates a metadata service. TVMaze is always enabled. TVDB is only enabled when tvdbAPIKey is non-empty.

func (*Service) HasTVDB

func (s *Service) HasTVDB() bool

HasTVDB reports whether the TVDB provider is configured.

func (*Service) LookupEpisodeTotal

func (s *Service) LookupEpisodeTotal(ctx context.Context, title string, seasonNumber int) (int, error)

LookupEpisodeTotal returns the total number of episodes in a season for the given show title. Results are cached for 1 hour after a successful lookup.

Jump to

Keyboard shortcuts

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