clisearch

package
v0.1.142 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: GPL-2.0, GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package clisearch implements CLI subtitle search, resolution, and download.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunSearch

func RunSearch(ctx context.Context, args []string, deps Deps) error

RunSearch performs a manual subtitle search from the command line. Returns an error instead of calling os.Exit, allowing the caller to decide how to handle failures.

Types

type Deps

type Deps struct {
	Cfg             api.ConfigProvider
	Registry        ProviderLoader
	Store           DownloadRecorder // nil = downloads not recorded
	ProviderTimeout time.Duration    // per-provider timeout; zero = defaultProviderTimeout
}

Deps holds the external dependencies needed by RunSearch.

type DownloadRecorder

type DownloadRecorder interface {
	SaveDownload(ctx context.Context, rec *api.DownloadRecord) error
	SetSyncOffset(ctx context.Context, path string, offsetMs int64) error
}

DownloadRecorder persists download records and their applied sync offsets. Satisfied by *boltstore.DB.

type ProviderLoader

type ProviderLoader interface {
	LoadAll(ctx context.Context, providers map[api.ProviderID]api.ProviderCfg) ([]api.Provider, error)
}

ProviderLoader is the narrow interface for loading providers from config. Satisfied by *provider.Registry via structural typing.

Jump to

Keyboard shortcuts

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