prowlarr

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractDomainFromIndexerFields

func ExtractDomainFromIndexerFields(fields []IndexerField) string

ExtractDomainFromIndexerFields extracts the tracker domain from Prowlarr indexer configuration fields

Types

type Client

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

Client provides a minimal Prowlarr API wrapper suitable for Torznab-style access.

func NewClient

func NewClient(cfg Config) *Client

NewClient constructs a new Client using the provided configuration.

func (*Client) GetIndexer

func (c *Client) GetIndexer(ctx context.Context, indexerID int) (*IndexerDetail, error)

GetIndexer retrieves detailed information about a specific indexer from Prowlarr

func (*Client) GetIndexers

func (c *Client) GetIndexers(ctx context.Context) ([]Indexer, error)

GetIndexers retrieves all configured indexers from the Prowlarr instance.

func (*Client) GetTrackerDomains

func (c *Client) GetTrackerDomains(ctx context.Context) ([]string, error)

GetTrackerDomains extracts actual tracker domains from Prowlarr indexers

func (*Client) SearchIndexer

func (c *Client) SearchIndexer(ctx context.Context, indexerID string, params map[string]string) (gojackett.Rss, error)

SearchIndexer performs a Torznab search via the specified Prowlarr indexer ID.

type Config

type Config struct {
	Host       string
	APIKey     string
	BasicUser  string
	BasicPass  string
	Timeout    int
	HTTPClient *http.Client
	UserAgent  string
	Version    string
}

Config holds the options for constructing a Client.

type Indexer

type Indexer struct {
	ID                 int    `json:"id"`
	Name               string `json:"name"`
	Description        string `json:"description"`
	Implementation     string `json:"implementation"`
	ImplementationName string `json:"implementationName"`
	Enable             bool   `json:"enable"`
	Protocol           string `json:"protocol"` // "unknown", "usenet", "torrent"
}

Indexer represents a configured Prowlarr indexer returned by the API.

type IndexerDetail

type IndexerDetail struct {
	ID                 int            `json:"id"`
	Name               string         `json:"name"`
	Description        string         `json:"description"`
	Implementation     string         `json:"implementation"`
	ImplementationName string         `json:"implementationName"`
	Enable             bool           `json:"enable"`
	Fields             []IndexerField `json:"fields"`
}

IndexerDetail represents detailed information about a Prowlarr indexer

type IndexerField

type IndexerField struct {
	Order    int    `json:"order"`
	Name     string `json:"name"`
	Label    string `json:"label"`
	Value    any    `json:"value"`
	Type     string `json:"type"`
	Advanced bool   `json:"advanced"`
}

IndexerField represents a configuration field for an indexer

type TorznabError

type TorznabError struct {
	Code    string `xml:"code,attr"`
	Message string `xml:",chardata"`
}

TorznabError represents a Torznab error response

Jump to

Keyboard shortcuts

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