torznab

package
v0.13.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: 14 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 torznab implements the Torznab indexer plugin for Prism. Torznab is an RSS/Atom-style XML protocol used by Prowlarr and Jackett to expose torrent indexers over a common API.

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"`
}

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

type Indexer

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

Indexer is a Torznab indexer plugin instance.

func New

func New(cfg Config) *Indexer

New creates a new Torznab 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 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.

Strategy: run BOTH the tmdbid lookup and the free-text search, then dedupe by GUID. Doing both is necessary because some Torznab/Prowlarr indexers silently ignore the `tmdbid=` parameter and return the recent-uploads feed instead (since `?t=movie` with no params IS the recent feed). The old "try tmdbid first, fall back if zero results" strategy was fooled by these indexers — the recent feed is non-empty so the fall-through never triggered, and search results were polluted with random recent uploads.

Indexers that properly honour `tmdbid` contribute precise hits; indexers that return the recent feed contribute noise that's filtered downstream by the title-match guard in autosearch/releases. The text search is the safety net that always runs.

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