library

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

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 orchestrates library client + store operations.

func NewService

func NewService(client domain.LibraryClient, store domain.Store, logger *slog.Logger) *Service

NewService creates a new library service.

func (*Service) ContinueWatching

func (s *Service) ContinueWatching(limit int) []*domain.MediaItem

ContinueWatching returns cached playable items that have progress.

func (*Service) FetchContinueWatching added in v1.1.0

func (s *Service) FetchContinueWatching(ctx context.Context) ([]*domain.MediaItem, error)

func (*Service) FetchEpisodes

func (s *Service) FetchEpisodes(ctx context.Context, libID, showID, seasonID string) ([]*domain.MediaItem, error)

func (*Service) FetchLibraries

func (s *Service) FetchLibraries(ctx context.Context) ([]domain.Library, error)

func (*Service) FetchMixedContent

func (s *Service) FetchMixedContent(
	ctx context.Context,
	libID string,
	onProgress domain.ProgressFunc,
) ([]domain.ListItem, error)

func (*Service) FetchMovies

func (s *Service) FetchMovies(
	ctx context.Context,
	libID string,
	onProgress domain.ProgressFunc,
) ([]*domain.MediaItem, error)

func (*Service) FetchSeasons

func (s *Service) FetchSeasons(ctx context.Context, libID, showID string) ([]*domain.Season, error)

func (*Service) FetchShows

func (s *Service) FetchShows(
	ctx context.Context,
	libID string,
	onProgress domain.ProgressFunc,
) ([]*domain.Show, error)

func (*Service) InvalidateAll

func (s *Service) InvalidateAll()

func (*Service) InvalidateLibrary

func (s *Service) InvalidateLibrary(libID string)

func (*Service) InvalidateSeason

func (s *Service) InvalidateSeason(libID, showID, seasonID string)

func (*Service) InvalidateShow

func (s *Service) InvalidateShow(libID, showID string)

func (*Service) RecentlyAdded

func (s *Service) RecentlyAdded(limit int) []domain.ListItem

RecentlyAdded returns cached items (movies and shows) ordered by AddedAt descending.

func (*Service) SmartFiltered

func (s *Service) SmartFiltered(filter string, limit int) []*domain.MediaItem

SmartFiltered returns cached playable items matching a named local filter.

func (*Service) SyncLibrary

func (s *Service) SyncLibrary(
	ctx context.Context,
	lib domain.Library,
	onProgress domain.ProgressFunc,
) (domain.SyncResult, error)

Jump to

Keyboard shortcuts

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