aggregator

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnavailable    = errors.New("aggregator runtime is unavailable")
	ErrReleaseMissing = errors.New("release not found")
)

Functions

This section is empty.

Types

type DependencyProvider added in v0.6.1

type DependencyProvider struct {
	Aggregator func() app.IndexerAggregator
	BlobStore  func() app.BlobStore
	Logger     func() Logger
}

type Logger added in v0.6.1

type Logger interface {
	Error(format string, args ...any)
}

type Manager

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

func NewManager

func NewManager(s store, l logger, cacheEnabled bool, searchPersistenceEnabled bool) *Manager

func (*Manager) AddSource

func (m *Manager) AddSource(src catalogSource)

AddSource registers a new nzb source to the manager.

func (*Manager) GetNZB

func (m *Manager) GetNZB(ctx context.Context, rel *domain.Release) (io.ReadCloser, error)

GetNZB handles retrieving nzb from cache or downloading from an indexer. Returns io.ReaderCloser so it can returned as a HTTP response or parsed for download

func (*Manager) GetResultByID

func (m *Manager) GetResultByID(ctx context.Context, id string) (*domain.Release, error)

GetResultByID resolves a release by id. checks in-memory recent results first, then persistent store if enabled.

func (*Manager) SearchAll

func (m *Manager) SearchAll(ctx context.Context, query string) ([]*domain.Release, error)

CHANGED: backward-compatible wrapper for older callers.

func (*Manager) SearchAllWithRequest

func (m *Manager) SearchAllWithRequest(ctx context.Context, req app.SearchRequest) ([]*domain.Release, error)

CHANGED: structured search request path for real Newznab movie/tvsearch support.

type Module added in v0.6.1

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

func NewModule added in v0.6.1

func NewModule(provider DependencyProvider) *Module

func (*Module) PrepareDownload added in v0.6.1

func (m *Module) PrepareDownload(ctx context.Context, id string) (*app.AggregatorDownloadResult, error)

func (*Module) Search added in v0.6.1

func (m *Module) Search(ctx context.Context, req app.SearchRequest) ([]*domain.Release, error)

type SearchRequest

type SearchRequest struct {
	Type SearchType

	Query string

	IMDbID   string
	TVDBID   string
	TVMazeID string
	RageID   string
	Season   string
	Episode  string
	Genre    string
}

type SearchType

type SearchType string
const (
	SearchTypeGeneric SearchType = "search"
	SearchTypeMovie   SearchType = "movie"
	SearchTypeTV      SearchType = "tvsearch"
)

Directories

Path Synopsis
sources

Jump to

Keyboard shortcuts

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