Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnreachable = errors.New("indexer unreachable") ErrUnexpectedStatus = errors.New("indexer returned unexpected status") ErrBadResponse = errors.New("indexer returned malformed response") )
Categorised torznab failures. Handlers map these to 422 with friendly messages; anything not matching is treated as a 500 internal error.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Search(ctx context.Context, params SearchParams) ([]SearchResult, error)
Feed(ctx context.Context) ([]SearchResult, error)
TestConnection(ctx context.Context) error
}
type Manager ¶
type Manager interface {
Test(ctx context.Context, p TestParams) error
TestByName(ctx context.Context, name string) error
SearchMovie(
ctx context.Context,
titles []string,
tmdbID uint32,
) ([]SearchResult, error)
SearchSeason(
ctx context.Context,
titles []string,
tvdbID uint32,
season uint16,
) ([]SearchResult, error)
SearchSeries(
ctx context.Context,
titles []string,
tvdbID uint32,
) ([]SearchResult, error)
SearchEpisode(
ctx context.Context,
titles []string,
tvdbID uint32,
season, episode uint16,
) ([]SearchResult, error)
Feed(ctx context.Context, indexerName string) ([]SearchResult, error)
}
Manager is the consumer-facing surface used by HTTP handlers and rss. CRUD over indexers lives in the YAML config (config.AddIndexer etc.); this surface keeps the behavioral operations that act on the configured entries.
type Prowlarr ¶
type Prowlarr struct {
// contains filtered or unexported fields
}
Prowlarr queries a Prowlarr instance's native search API (GET /api/v1/search), which aggregates across every indexer Prowlarr manages in one call. Unlike Jackett, Prowlarr exposes no combined Torznab feed — its per-indexer Torznab endpoints (/{id}/api) only hit one tracker — so a dedicated JSON client is the only way to "query all indexers".
func NewProwlarr ¶
func (*Prowlarr) Feed ¶
func (p *Prowlarr) Feed(context.Context) ([]SearchResult, error)
Feed has no analogue in Prowlarr. Per the Servarr wiki, "an aggregate multi-indexer endpoint will not be added", and the search API requires a query — so there is no cross-indexer latest-releases feed to forward. rss-sync gets nothing for a Prowlarr entry, which is correct: RSS monitoring belongs on the individual trackers.
func (*Prowlarr) Search ¶
func (p *Prowlarr) Search( ctx context.Context, params SearchParams, ) ([]SearchResult, error)
type SearchParams ¶
type SearchResult ¶
type SearchResult struct {
Title string
InfoURL string
Download string
Size int64
Seeders uint32
Leechers uint32
Category string
PublishDate time.Time
// Indexer is the configured name of the indexer this result came from.
// Stamped by the search service during cross-indexer aggregation.
Indexer string
}
type TestParams ¶
type TestParams struct {
Protocol string
Host string
Port uint16
Path string
UseSSL bool
APIKey string
}
TestParams describes ad-hoc credentials for a connection test that has not yet been persisted as an Indexer row.
type Torznab ¶
type Torznab struct {
// contains filtered or unexported fields
}
func NewTorznab ¶
func (*Torznab) Feed ¶
func (t *Torznab) Feed(ctx context.Context) ([]SearchResult, error)
Feed performs a forward-feed query (`t=search` with no `q`), returning the indexer's recent items. Used by the rss-sync feed scanner.
func (*Torznab) Search ¶
func (t *Torznab) Search( ctx context.Context, params SearchParams, ) ([]SearchResult, error)