newznab

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package newznab implements the Newznab indexer plugin for Pilot. Newznab is an RSS/Atom-style XML protocol for NZB indexers. It shares the same feed envelope and API parameter shape as Torznab, but serves NZB releases rather than torrents — so there are no seeder/peer attributes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL       string `json:"url"`
	APIKey    string `json:"api_key,omitempty"`
	RateLimit int    `json:"rate_limit,omitempty"` // requests per minute; 0 = unlimited
}

Config holds the user-supplied settings for a Newznab indexer instance.

type Indexer

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

Indexer is a Newznab indexer plugin instance.

func New

func New(cfg Config) *Indexer

New creates a new Newznab Indexer from the given config.

func (*Indexer) Capabilities

func (idx *Indexer) Capabilities(ctx context.Context) (plugin.Capabilities, error)

Capabilities fetches and parses the indexer's capabilities document.

func (*Indexer) GetRecent

func (idx *Indexer) GetRecent(ctx context.Context) ([]plugin.Release, error)

GetRecent returns the most recent TV releases from the indexer's RSS feed.

func (*Indexer) Name

func (idx *Indexer) Name() string

Name returns the human-readable plugin name.

func (*Indexer) Protocol

func (idx *Indexer) Protocol() plugin.Protocol

Protocol returns the protocol this indexer serves.

func (*Indexer) Search

func (idx *Indexer) Search(ctx context.Context, q plugin.SearchQuery) ([]plugin.Release, error)

Search queries the indexer for releases matching q. Uses TV search (?t=tvsearch&tvdbid=…) when a TVDB ID is available, otherwise falls back to free-text search. The caller should build a well-formed show query in q.Query (e.g. "Breaking Bad S01E05").

func (*Indexer) Test

func (idx *Indexer) Test(ctx context.Context) error

Test checks that the indexer is reachable and returns a valid capabilities response. Returns a non-nil error if connectivity or configuration fails.

Jump to

Keyboard shortcuts

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