prowlarr

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package prowlarr provides a client for the Prowlarr v1 API.

Prowlarr is an indexer manager and proxy that integrates with various PVR applications. It manages all indexer configuration in a single place and pushes them to connected applications like Sonarr, Radarr, Lidarr, and Readarr.

The Client type wraps arr.BaseClient and exposes typed methods for every major Prowlarr resource: indexers, applications, app profiles, search, history, statistics, tags, commands, and more.

Example
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/lusoris/goenvoy/arr/prowlarr"
)

func main() {
	// Create a new Prowlarr client
	client, err := prowlarr.New("http://localhost:9696", "your-api-key")
	if err != nil {
		log.Fatal(err)
	}

	ctx := context.Background()

	// Get system status
	status, err := client.GetSystemStatus(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s version %s\n", status.AppName, status.Version)

	// Get all indexers
	indexers, err := client.GetIndexers(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("Total indexers: %d\n", len(indexers))
}

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppProfile

type AppProfile struct {
	ID                      int    `json:"id"`
	Name                    string `json:"name"`
	EnableRss               bool   `json:"enableRss"`
	EnableAutomaticSearch   bool   `json:"enableAutomaticSearch"`
	EnableInteractiveSearch bool   `json:"enableInteractiveSearch"`
	MinimumSeeders          int    `json:"minimumSeeders"`
}

AppProfile defines search behavior settings for indexers.

type Application

type Application struct {
	ID                 int              `json:"id"`
	Name               string           `json:"name"`
	Fields             []Field          `json:"fields,omitempty"`
	ImplementationName string           `json:"implementationName,omitempty"`
	Implementation     string           `json:"implementation,omitempty"`
	ConfigContract     string           `json:"configContract,omitempty"`
	InfoLink           string           `json:"infoLink,omitempty"`
	Message            *ProviderMessage `json:"message,omitempty"`
	Tags               []int            `json:"tags,omitempty"`
	SyncLevel          string           `json:"syncLevel,omitempty"`
}

Application represents a connected PVR application (Sonarr, Radarr, etc.).

type ApplicationBulkResource added in v1.1.0

type ApplicationBulkResource struct {
	IDs       []int  `json:"ids,omitempty"`
	Tags      []int  `json:"tags,omitempty"`
	ApplyTags string `json:"applyTags,omitempty"`
	SyncLevel string `json:"syncLevel,omitempty"`
}

ApplicationBulkResource represents a bulk update for applications.

type Client

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

Client is a Prowlarr API client.

func New

func New(baseURL, apiKey string, opts ...arr.Option) (*Client, error)

New creates a Prowlarr Client for the instance at baseURL.

func (*Client) AddAppProfile

func (c *Client) AddAppProfile(ctx context.Context, profile *AppProfile) (*AppProfile, error)

AddAppProfile creates a new app profile.

func (*Client) AddApplication

func (c *Client) AddApplication(ctx context.Context, app *Application) (*Application, error)

AddApplication adds a new application to Prowlarr.

func (*Client) AddIndexer

func (c *Client) AddIndexer(ctx context.Context, indexer *Indexer) (*Indexer, error)

AddIndexer adds a new indexer to Prowlarr.

func (*Client) ApplicationAction added in v1.1.0

func (c *Client) ApplicationAction(ctx context.Context, name string, body *Application) error

ApplicationAction triggers a named action on an application provider.

func (*Client) BrowseFileSystem added in v1.1.0

func (c *Client) BrowseFileSystem(ctx context.Context, path string) (map[string]any, error)

BrowseFileSystem returns directory/file listings for the given path.

func (*Client) BulkDeleteApplications added in v1.1.0

func (c *Client) BulkDeleteApplications(ctx context.Context, ids []int) error

BulkDeleteApplications deletes multiple applications at once.

func (*Client) BulkDeleteDownloadClients added in v1.1.0

func (c *Client) BulkDeleteDownloadClients(ctx context.Context, ids []int) error

BulkDeleteDownloadClients deletes multiple download clients at once.

func (*Client) BulkDeleteIndexers added in v1.1.0

func (c *Client) BulkDeleteIndexers(ctx context.Context, ids []int) error

BulkDeleteIndexers deletes multiple indexers at once.

func (*Client) BulkUpdateApplications added in v1.1.0

func (c *Client) BulkUpdateApplications(ctx context.Context, bulk *ApplicationBulkResource) ([]Application, error)

BulkUpdateApplications updates multiple applications at once.

func (*Client) BulkUpdateDownloadClients added in v1.1.0

func (c *Client) BulkUpdateDownloadClients(ctx context.Context, bulk *arr.ProviderBulkResource) ([]DownloadClientResource, error)

BulkUpdateDownloadClients updates multiple download clients at once.

func (*Client) BulkUpdateIndexers added in v1.1.0

func (c *Client) BulkUpdateIndexers(ctx context.Context, bulk *IndexerBulkResource) ([]Indexer, error)

BulkUpdateIndexers updates multiple indexers at once.

func (*Client) CreateCustomFilter added in v1.1.0

func (c *Client) CreateCustomFilter(ctx context.Context, filter *arr.CustomFilterResource) (*arr.CustomFilterResource, error)

CreateCustomFilter creates a new custom filter.

func (*Client) CreateDownloadClient added in v1.1.0

func (c *Client) CreateDownloadClient(ctx context.Context, dc *DownloadClientResource) (*DownloadClientResource, error)

CreateDownloadClient creates a new download client.

func (*Client) CreateIndexerProxy added in v1.1.0

func (c *Client) CreateIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) (*IndexerProxyResource, error)

CreateIndexerProxy creates a new indexer proxy.

func (*Client) CreateNotification added in v1.1.0

func (c *Client) CreateNotification(ctx context.Context, n *arr.ProviderResource) (*arr.ProviderResource, error)

CreateNotification creates a new notification.

func (*Client) CreateTag

func (c *Client) CreateTag(ctx context.Context, label string) (*arr.Tag, error)

CreateTag creates a new tag and returns it with its assigned ID.

func (*Client) DeleteAppProfile

func (c *Client) DeleteAppProfile(ctx context.Context, id int) error

DeleteAppProfile removes an app profile by its ID.

func (*Client) DeleteApplication

func (c *Client) DeleteApplication(ctx context.Context, id int) error

DeleteApplication removes a connected application by its ID.

func (*Client) DeleteBackup added in v1.1.0

func (c *Client) DeleteBackup(ctx context.Context, id int) error

DeleteBackup deletes a backup by ID.

func (*Client) DeleteCommand added in v1.1.0

func (c *Client) DeleteCommand(ctx context.Context, id int) error

DeleteCommand deletes a command by ID.

func (*Client) DeleteCustomFilter added in v1.1.0

func (c *Client) DeleteCustomFilter(ctx context.Context, id int) error

DeleteCustomFilter deletes a custom filter by ID.

func (*Client) DeleteDownloadClient added in v1.1.0

func (c *Client) DeleteDownloadClient(ctx context.Context, id int) error

DeleteDownloadClient deletes a download client by ID.

func (*Client) DeleteIndexer

func (c *Client) DeleteIndexer(ctx context.Context, id int) error

DeleteIndexer removes an indexer by its database ID.

func (*Client) DeleteIndexerProxy added in v1.1.0

func (c *Client) DeleteIndexerProxy(ctx context.Context, id int) error

DeleteIndexerProxy deletes an indexer proxy by ID.

func (*Client) DeleteNotification added in v1.1.0

func (c *Client) DeleteNotification(ctx context.Context, id int) error

DeleteNotification deletes a notification by ID.

func (*Client) DeleteTag added in v1.1.0

func (c *Client) DeleteTag(ctx context.Context, id int) error

DeleteTag deletes a tag by ID.

func (*Client) DownloadClientAction added in v1.1.0

func (c *Client) DownloadClientAction(ctx context.Context, name string, body *DownloadClientResource) error

DownloadClientAction triggers a named action on a download client provider.

func (*Client) DownloadIndexerRelease added in v1.1.0

func (c *Client) DownloadIndexerRelease(ctx context.Context, id int) (string, error)

DownloadIndexerRelease downloads a release from an indexer by ID.

func (*Client) GetAppProfile

func (c *Client) GetAppProfile(ctx context.Context, id int) (*AppProfile, error)

GetAppProfile returns a single app profile by its ID.

func (*Client) GetAppProfileSchema added in v1.1.0

func (c *Client) GetAppProfileSchema(ctx context.Context) (*AppProfile, error)

GetAppProfileSchema returns the app profile schema.

func (*Client) GetAppProfiles

func (c *Client) GetAppProfiles(ctx context.Context) ([]AppProfile, error)

GetAppProfiles returns all app profiles.

func (*Client) GetApplication

func (c *Client) GetApplication(ctx context.Context, id int) (*Application, error)

GetApplication returns a single application by its database ID.

func (*Client) GetApplicationSchema added in v1.1.0

func (c *Client) GetApplicationSchema(ctx context.Context) ([]Application, error)

GetApplicationSchema returns the schema for all application types.

func (*Client) GetApplications

func (c *Client) GetApplications(ctx context.Context) ([]Application, error)

GetApplications returns all connected PVR applications.

func (*Client) GetBackups added in v1.1.0

func (c *Client) GetBackups(ctx context.Context) ([]arr.Backup, error)

GetBackups returns a list of all available backups.

func (*Client) GetCommand

func (c *Client) GetCommand(ctx context.Context, id int) (*arr.CommandResponse, error)

GetCommand returns the status of a single command by its ID.

func (*Client) GetCommands

func (c *Client) GetCommands(ctx context.Context) ([]arr.CommandResponse, error)

GetCommands returns all currently queued or running commands.

func (*Client) GetCustomFilter added in v1.1.0

func (c *Client) GetCustomFilter(ctx context.Context, id int) (*arr.CustomFilterResource, error)

GetCustomFilter returns a single custom filter by its ID.

func (*Client) GetCustomFilters added in v1.1.0

func (c *Client) GetCustomFilters(ctx context.Context) ([]arr.CustomFilterResource, error)

GetCustomFilters returns all custom filters.

func (*Client) GetDevelopmentConfig added in v1.1.0

func (c *Client) GetDevelopmentConfig(ctx context.Context) (*DevelopmentConfigResource, error)

GetDevelopmentConfig returns the development configuration.

func (*Client) GetDevelopmentConfigByID added in v1.1.0

func (c *Client) GetDevelopmentConfigByID(ctx context.Context, id int) (*DevelopmentConfigResource, error)

GetDevelopmentConfigByID returns the development config by its ID.

func (*Client) GetDownloadClient added in v1.1.0

func (c *Client) GetDownloadClient(ctx context.Context, id int) (*DownloadClientResource, error)

GetDownloadClient returns a single download client by its ID.

func (*Client) GetDownloadClientConfig added in v1.1.0

func (c *Client) GetDownloadClientConfig(ctx context.Context) (*arr.DownloadClientConfigResource, error)

GetDownloadClientConfig returns the download client configuration.

func (*Client) GetDownloadClientConfigByID added in v1.1.0

func (c *Client) GetDownloadClientConfigByID(ctx context.Context, id int) (*arr.DownloadClientConfigResource, error)

GetDownloadClientConfigByID returns the download client config by its ID.

func (*Client) GetDownloadClientSchema added in v1.1.0

func (c *Client) GetDownloadClientSchema(ctx context.Context) ([]DownloadClientResource, error)

GetDownloadClientSchema returns the schema for all download client types.

func (*Client) GetDownloadClients

func (c *Client) GetDownloadClients(ctx context.Context) ([]DownloadClientResource, error)

GetDownloadClients returns all configured download clients.

func (*Client) GetFileSystemType added in v1.1.0

func (c *Client) GetFileSystemType(ctx context.Context, path string) (string, error)

GetFileSystemType returns the filesystem type for the given path.

func (*Client) GetHealth

func (c *Client) GetHealth(ctx context.Context) ([]arr.HealthCheck, error)

GetHealth returns current health check results.

func (*Client) GetHistory

func (c *Client) GetHistory(ctx context.Context, page, pageSize int) (*arr.PagingResource[HistoryRecord], error)

GetHistory returns the indexer history with pagination.

func (*Client) GetHistoryByIndexer

func (c *Client) GetHistoryByIndexer(ctx context.Context, indexerID, limit int) ([]HistoryRecord, error)

GetHistoryByIndexer returns history events for a specific indexer.

func (*Client) GetHistorySince

func (c *Client) GetHistorySince(ctx context.Context, date string) ([]HistoryRecord, error)

GetHistorySince returns history events since a specific date (RFC 3339 timestamp).

func (*Client) GetHostConfig added in v1.1.0

func (c *Client) GetHostConfig(ctx context.Context) (*arr.HostConfigResource, error)

GetHostConfig returns the host configuration.

func (*Client) GetHostConfigByID added in v1.1.0

func (c *Client) GetHostConfigByID(ctx context.Context, id int) (*arr.HostConfigResource, error)

GetHostConfigByID returns the host config by its ID.

func (*Client) GetIndexer

func (c *Client) GetIndexer(ctx context.Context, id int) (*Indexer, error)

GetIndexer returns a single indexer by its database ID.

func (*Client) GetIndexerCategories

func (c *Client) GetIndexerCategories(ctx context.Context) ([]IndexerCategory, error)

GetIndexerCategories returns the global list of Newznab/Torznab categories.

func (*Client) GetIndexerNewznab added in v1.1.0

func (c *Client) GetIndexerNewznab(ctx context.Context, id int) (string, error)

GetIndexerNewznab returns the Newznab/Torznab XML feed for an indexer.

func (*Client) GetIndexerProxies added in v1.1.0

func (c *Client) GetIndexerProxies(ctx context.Context) ([]IndexerProxyResource, error)

GetIndexerProxies returns all configured indexer proxies.

func (*Client) GetIndexerProxy added in v1.1.0

func (c *Client) GetIndexerProxy(ctx context.Context, id int) (*IndexerProxyResource, error)

GetIndexerProxy returns a single indexer proxy by its ID.

func (*Client) GetIndexerProxySchema added in v1.1.0

func (c *Client) GetIndexerProxySchema(ctx context.Context) ([]IndexerProxyResource, error)

GetIndexerProxySchema returns the schema for all indexer proxy types.

func (*Client) GetIndexerSchema added in v1.1.0

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

GetIndexerSchema returns the schema for all indexer types.

func (*Client) GetIndexerStats

func (c *Client) GetIndexerStats(ctx context.Context, startDate, endDate string) (*IndexerStats, error)

GetIndexerStats returns aggregated indexer statistics for the given date range.

func (*Client) GetIndexerStatuses

func (c *Client) GetIndexerStatuses(ctx context.Context) ([]IndexerStatus, error)

GetIndexerStatuses returns the status of all indexers (including disabled ones).

func (*Client) GetIndexers

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

GetIndexers returns all configured indexers.

func (*Client) GetLocalization added in v1.1.0

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

GetLocalization returns the localization strings.

func (*Client) GetLocalizationOptions added in v1.1.0

func (c *Client) GetLocalizationOptions(ctx context.Context) ([]LocalizationOption, error)

GetLocalizationOptions returns available localization language options.

func (*Client) GetLogFileContent added in v1.1.0

func (c *Client) GetLogFileContent(ctx context.Context, filename string) (string, error)

GetLogFileContent returns the content of a specific log file by filename.

func (*Client) GetLogFiles added in v1.1.0

func (c *Client) GetLogFiles(ctx context.Context) ([]arr.LogFileResource, error)

GetLogFiles returns a list of log files.

func (*Client) GetLogs added in v1.1.0

func (c *Client) GetLogs(ctx context.Context, page, pageSize int) (*arr.PagingResource[arr.LogRecord], error)

GetLogs returns log entries with pagination.

func (*Client) GetNotification added in v1.1.0

func (c *Client) GetNotification(ctx context.Context, id int) (*arr.ProviderResource, error)

GetNotification returns a single notification by its ID.

func (*Client) GetNotificationSchema added in v1.1.0

func (c *Client) GetNotificationSchema(ctx context.Context) ([]arr.ProviderResource, error)

GetNotificationSchema returns the schema for all notification types.

func (*Client) GetNotifications added in v1.1.0

func (c *Client) GetNotifications(ctx context.Context) ([]arr.ProviderResource, error)

GetNotifications returns all configured notifications.

func (*Client) GetSystemRoutes added in v1.1.0

func (c *Client) GetSystemRoutes(ctx context.Context) ([]arr.SystemRouteResource, error)

GetSystemRoutes returns all API routes.

func (*Client) GetSystemRoutesDuplicate added in v1.1.0

func (c *Client) GetSystemRoutesDuplicate(ctx context.Context) ([]arr.SystemRouteResource, error)

GetSystemRoutesDuplicate returns duplicate API routes.

func (*Client) GetSystemStatus

func (c *Client) GetSystemStatus(ctx context.Context) (*arr.StatusResponse, error)

GetSystemStatus returns Prowlarr system information.

func (*Client) GetTag added in v1.1.0

func (c *Client) GetTag(ctx context.Context, id int) (*arr.Tag, error)

GetTag returns a single tag by its ID.

func (*Client) GetTagDetail added in v1.1.0

func (c *Client) GetTagDetail(ctx context.Context, id int) (*arr.TagDetail, error)

GetTagDetail returns a single tag detail by its ID.

func (*Client) GetTagDetails added in v1.1.0

func (c *Client) GetTagDetails(ctx context.Context) ([]arr.TagDetail, error)

GetTagDetails returns all tags with details about their usage.

func (*Client) GetTags

func (c *Client) GetTags(ctx context.Context) ([]arr.Tag, error)

GetTags returns all tags.

func (*Client) GetTask added in v1.1.0

func (c *Client) GetTask(ctx context.Context, id int) (*arr.TaskResource, error)

GetTask returns a single task by its ID.

func (*Client) GetTasks added in v1.1.0

func (c *Client) GetTasks(ctx context.Context) ([]arr.TaskResource, error)

GetTasks returns all scheduled tasks.

func (*Client) GetUIConfig added in v1.1.0

func (c *Client) GetUIConfig(ctx context.Context) (*arr.UIConfigResource, error)

GetUIConfig returns the UI configuration.

func (*Client) GetUIConfigByID added in v1.1.0

func (c *Client) GetUIConfigByID(ctx context.Context, id int) (*arr.UIConfigResource, error)

GetUIConfigByID returns the UI config by its ID.

func (*Client) GetUpdateLogFileContent added in v1.1.0

func (c *Client) GetUpdateLogFileContent(ctx context.Context, filename string) (string, error)

GetUpdateLogFileContent returns the content of a specific update log file.

func (*Client) GetUpdateLogFiles added in v1.1.0

func (c *Client) GetUpdateLogFiles(ctx context.Context) ([]arr.LogFileResource, error)

GetUpdateLogFiles returns a list of update log files.

func (*Client) GetUpdates added in v1.1.0

func (c *Client) GetUpdates(ctx context.Context) ([]arr.UpdateResource, error)

GetUpdates returns available application updates.

func (*Client) GrabRelease

func (c *Client) GrabRelease(ctx context.Context, release *Release) (*Release, error)

GrabRelease sends a release to the download client.

func (*Client) GrabReleasesBulk added in v1.1.0

func (c *Client) GrabReleasesBulk(ctx context.Context, releases []Release) (*Release, error)

GrabReleasesBulk sends multiple releases to the download client.

func (*Client) HeadPing added in v1.1.0

func (c *Client) HeadPing(ctx context.Context) error

HeadPing performs a lightweight HEAD request to /ping.

func (*Client) IndexerAction added in v1.1.0

func (c *Client) IndexerAction(ctx context.Context, name string, body *Indexer) error

IndexerAction triggers a named action on an indexer provider.

func (*Client) IndexerProxyAction added in v1.1.0

func (c *Client) IndexerProxyAction(ctx context.Context, name string, body *IndexerProxyResource) error

IndexerProxyAction triggers a named action on an indexer proxy provider.

func (*Client) NotificationAction added in v1.1.0

func (c *Client) NotificationAction(ctx context.Context, name string, body *arr.ProviderResource) error

NotificationAction triggers a named action on a notification provider.

func (*Client) Ping added in v1.1.0

func (c *Client) Ping(ctx context.Context) error

Ping checks connectivity to the Prowlarr instance.

func (*Client) Restart added in v1.1.0

func (c *Client) Restart(ctx context.Context) error

Restart sends a restart command to Prowlarr.

func (*Client) RestoreBackup added in v1.1.0

func (c *Client) RestoreBackup(ctx context.Context, id int) error

RestoreBackup triggers a restore from a backup by ID.

func (*Client) Search

func (c *Client) Search(ctx context.Context, opts *SearchOptions) ([]Release, error)

Search performs a search across configured indexers.

func (*Client) SendCommand

func (c *Client) SendCommand(ctx context.Context, cmd arr.CommandRequest) (*arr.CommandResponse, error)

SendCommand triggers a named command.

func (*Client) Shutdown added in v1.1.0

func (c *Client) Shutdown(ctx context.Context) error

Shutdown sends a shutdown command to Prowlarr.

func (*Client) TestAllApplications added in v1.1.0

func (c *Client) TestAllApplications(ctx context.Context) error

TestAllApplications tests all configured applications.

func (*Client) TestAllDownloadClients added in v1.1.0

func (c *Client) TestAllDownloadClients(ctx context.Context) error

TestAllDownloadClients tests all configured download clients.

func (*Client) TestAllIndexerProxies added in v1.1.0

func (c *Client) TestAllIndexerProxies(ctx context.Context) error

TestAllIndexerProxies tests all configured indexer proxies.

func (*Client) TestAllIndexers added in v1.1.0

func (c *Client) TestAllIndexers(ctx context.Context) error

TestAllIndexers tests all configured indexers.

func (*Client) TestAllNotifications added in v1.1.0

func (c *Client) TestAllNotifications(ctx context.Context) error

TestAllNotifications tests all configured notifications.

func (*Client) TestApplication added in v1.1.0

func (c *Client) TestApplication(ctx context.Context, app *Application) error

TestApplication tests an application configuration.

func (*Client) TestDownloadClient added in v1.1.0

func (c *Client) TestDownloadClient(ctx context.Context, dc *DownloadClientResource) error

TestDownloadClient tests a download client configuration.

func (*Client) TestIndexer added in v1.1.0

func (c *Client) TestIndexer(ctx context.Context, idx *Indexer) error

TestIndexer tests an indexer configuration.

func (*Client) TestIndexerProxy added in v1.1.0

func (c *Client) TestIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) error

TestIndexerProxy tests an indexer proxy configuration.

func (*Client) TestNotification added in v1.1.0

func (c *Client) TestNotification(ctx context.Context, n *arr.ProviderResource) error

TestNotification tests a notification configuration.

func (*Client) UpdateAppProfile

func (c *Client) UpdateAppProfile(ctx context.Context, profile *AppProfile) (*AppProfile, error)

UpdateAppProfile updates an existing app profile.

func (*Client) UpdateApplication

func (c *Client) UpdateApplication(ctx context.Context, app *Application) (*Application, error)

UpdateApplication updates an existing application.

func (*Client) UpdateCustomFilter added in v1.1.0

func (c *Client) UpdateCustomFilter(ctx context.Context, filter *arr.CustomFilterResource) (*arr.CustomFilterResource, error)

UpdateCustomFilter updates an existing custom filter.

func (*Client) UpdateDevelopmentConfig added in v1.1.0

func (c *Client) UpdateDevelopmentConfig(ctx context.Context, config *DevelopmentConfigResource) (*DevelopmentConfigResource, error)

UpdateDevelopmentConfig updates the development configuration.

func (*Client) UpdateDownloadClient added in v1.1.0

func (c *Client) UpdateDownloadClient(ctx context.Context, dc *DownloadClientResource) (*DownloadClientResource, error)

UpdateDownloadClient updates an existing download client.

func (*Client) UpdateDownloadClientConfig added in v1.1.0

func (c *Client) UpdateDownloadClientConfig(ctx context.Context, config *arr.DownloadClientConfigResource) (*arr.DownloadClientConfigResource, error)

UpdateDownloadClientConfig updates the download client configuration.

func (*Client) UpdateHostConfig added in v1.1.0

func (c *Client) UpdateHostConfig(ctx context.Context, config *arr.HostConfigResource) (*arr.HostConfigResource, error)

UpdateHostConfig updates the host configuration.

func (*Client) UpdateIndexer

func (c *Client) UpdateIndexer(ctx context.Context, indexer *Indexer) (*Indexer, error)

UpdateIndexer updates an existing indexer.

func (*Client) UpdateIndexerProxy added in v1.1.0

func (c *Client) UpdateIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) (*IndexerProxyResource, error)

UpdateIndexerProxy updates an existing indexer proxy.

func (*Client) UpdateNotification added in v1.1.0

func (c *Client) UpdateNotification(ctx context.Context, n *arr.ProviderResource) (*arr.ProviderResource, error)

UpdateNotification updates an existing notification.

func (*Client) UpdateTag added in v1.1.0

func (c *Client) UpdateTag(ctx context.Context, tag *arr.Tag) (*arr.Tag, error)

UpdateTag updates an existing tag.

func (*Client) UpdateUIConfig added in v1.1.0

func (c *Client) UpdateUIConfig(ctx context.Context, config *arr.UIConfigResource) (*arr.UIConfigResource, error)

UpdateUIConfig updates the UI configuration.

func (*Client) UploadBackup added in v1.1.0

func (c *Client) UploadBackup(ctx context.Context, fileName string, data io.Reader) error

UploadBackup uploads a backup file via multipart form POST.

type DevelopmentConfigResource added in v1.1.0

type DevelopmentConfigResource struct {
	ID                 int    `json:"id"`
	ConsoleLogLevel    string `json:"consoleLogLevel,omitempty"`
	LogSql             bool   `json:"logSql"`
	LogIndexerResponse bool   `json:"logIndexerResponse"`
	LogRotate          int    `json:"logRotate"`
	FilterSentryEvents bool   `json:"filterSentryEvents"`
}

DevelopmentConfigResource represents Prowlarr development configuration.

type DownloadClientResource

type DownloadClientResource struct {
	ID                 int     `json:"id"`
	Name               string  `json:"name"`
	Fields             []Field `json:"fields,omitempty"`
	ImplementationName string  `json:"implementationName,omitempty"`
	Implementation     string  `json:"implementation,omitempty"`
	ConfigContract     string  `json:"configContract,omitempty"`
	Tags               []int   `json:"tags,omitempty"`
	Enable             bool    `json:"enable"`
	Protocol           string  `json:"protocol,omitempty"`
	Priority           int     `json:"priority"`
}

DownloadClientResource represents a download client configured in Prowlarr.

type Field

type Field struct {
	Order    int    `json:"order"`
	Name     string `json:"name,omitempty"`
	Label    string `json:"label,omitempty"`
	HelpText string `json:"helpText,omitempty"`
	Value    any    `json:"value,omitempty"`
	Type     string `json:"type,omitempty"`
	Advanced bool   `json:"advanced"`
}

Field represents a configurable field for a provider (indexer, application, etc.).

type HistoryRecord

type HistoryRecord struct {
	ID         int               `json:"id"`
	IndexerID  int               `json:"indexerId"`
	Date       string            `json:"date"`
	DownloadID string            `json:"downloadId,omitempty"`
	Successful bool              `json:"successful"`
	EventType  string            `json:"eventType"`
	Data       map[string]string `json:"data,omitempty"`
}

HistoryRecord represents an indexer event in Prowlarr history.

type HostStatistic

type HostStatistic struct {
	Host            string `json:"host,omitempty"`
	NumberOfQueries int    `json:"numberOfQueries"`
	NumberOfGrabs   int    `json:"numberOfGrabs"`
}

HostStatistic contains query/grab stats for a host.

type Indexer

type Indexer struct {
	ID                 int                  `json:"id"`
	Name               string               `json:"name"`
	Fields             []Field              `json:"fields,omitempty"`
	ImplementationName string               `json:"implementationName,omitempty"`
	Implementation     string               `json:"implementation,omitempty"`
	ConfigContract     string               `json:"configContract,omitempty"`
	InfoLink           string               `json:"infoLink,omitempty"`
	Message            *ProviderMessage     `json:"message,omitempty"`
	Tags               []int                `json:"tags,omitempty"`
	IndexerURLs        []string             `json:"indexerUrls,omitempty"`
	LegacyURLs         []string             `json:"legacyUrls,omitempty"`
	DefinitionName     string               `json:"definitionName,omitempty"`
	Description        string               `json:"description,omitempty"`
	Language           string               `json:"language,omitempty"`
	Encoding           string               `json:"encoding,omitempty"`
	Enable             bool                 `json:"enable"`
	Redirect           bool                 `json:"redirect"`
	SupportsRss        bool                 `json:"supportsRss"`
	SupportsSearch     bool                 `json:"supportsSearch"`
	SupportsRedirect   bool                 `json:"supportsRedirect"`
	SupportsPagination bool                 `json:"supportsPagination"`
	AppProfileID       int                  `json:"appProfileId"`
	Protocol           string               `json:"protocol,omitempty"`
	Privacy            string               `json:"privacy,omitempty"`
	Capabilities       *IndexerCapability   `json:"capabilities,omitempty"`
	Priority           int                  `json:"priority"`
	DownloadClientID   int                  `json:"downloadClientId,omitempty"`
	Added              string               `json:"added,omitempty"`
	Status             *IndexerStatusDetail `json:"status,omitempty"`
	SortName           string               `json:"sortName,omitempty"`
}

Indexer represents a configured indexer in Prowlarr.

type IndexerBulkResource added in v1.1.0

type IndexerBulkResource struct {
	IDs             []int    `json:"ids,omitempty"`
	Tags            []int    `json:"tags,omitempty"`
	ApplyTags       string   `json:"applyTags,omitempty"`
	Enable          *bool    `json:"enable,omitempty"`
	AppProfileID    *int     `json:"appProfileId,omitempty"`
	Priority        *int     `json:"priority,omitempty"`
	MinimumSeeders  *int     `json:"minimumSeeders,omitempty"`
	SeedRatio       *float64 `json:"seedRatio,omitempty"`
	SeedTime        *int     `json:"seedTime,omitempty"`
	PackSeedTime    *int     `json:"packSeedTime,omitempty"`
	PreferMagnetURL *bool    `json:"preferMagnetUrl,omitempty"`
}

IndexerBulkResource represents a bulk update for indexers.

type IndexerCapability

type IndexerCapability struct {
	ID                int               `json:"id"`
	LimitsMax         *int              `json:"limitsMax,omitempty"`
	LimitsDefault     *int              `json:"limitsDefault,omitempty"`
	Categories        []IndexerCategory `json:"categories,omitempty"`
	SupportsRawSearch bool              `json:"supportsRawSearch"`
}

IndexerCapability describes the search capabilities of an indexer.

type IndexerCategory

type IndexerCategory struct {
	ID            int               `json:"id"`
	Name          string            `json:"name,omitempty"`
	Description   string            `json:"description,omitempty"`
	SubCategories []IndexerCategory `json:"subCategories,omitempty"`
}

IndexerCategory represents a Newznab/Torznab category.

type IndexerProxyResource added in v1.1.0

type IndexerProxyResource struct {
	ID                    int                    `json:"id"`
	Name                  string                 `json:"name,omitempty"`
	Fields                []Field                `json:"fields,omitempty"`
	ImplementationName    string                 `json:"implementationName,omitempty"`
	Implementation        string                 `json:"implementation,omitempty"`
	ConfigContract        string                 `json:"configContract,omitempty"`
	InfoLink              string                 `json:"infoLink,omitempty"`
	Message               *ProviderMessage       `json:"message,omitempty"`
	Tags                  []int                  `json:"tags,omitempty"`
	Presets               []IndexerProxyResource `json:"presets,omitempty"`
	Link                  string                 `json:"link,omitempty"`
	OnHealthIssue         bool                   `json:"onHealthIssue"`
	SupportsOnHealthIssue bool                   `json:"supportsOnHealthIssue"`
	IncludeHealthWarnings bool                   `json:"includeHealthWarnings"`
	TestCommand           string                 `json:"testCommand,omitempty"`
}

IndexerProxyResource represents a configured indexer proxy in Prowlarr.

type IndexerStatistic

type IndexerStatistic struct {
	IndexerID                 int    `json:"indexerId"`
	IndexerName               string `json:"indexerName,omitempty"`
	AverageResponseTime       int    `json:"averageResponseTime"`
	AverageGrabResponseTime   int    `json:"averageGrabResponseTime"`
	NumberOfQueries           int    `json:"numberOfQueries"`
	NumberOfGrabs             int    `json:"numberOfGrabs"`
	NumberOfRssQueries        int    `json:"numberOfRssQueries"`
	NumberOfAuthQueries       int    `json:"numberOfAuthQueries"`
	NumberOfFailedQueries     int    `json:"numberOfFailedQueries"`
	NumberOfFailedGrabs       int    `json:"numberOfFailedGrabs"`
	NumberOfFailedRssQueries  int    `json:"numberOfFailedRssQueries"`
	NumberOfFailedAuthQueries int    `json:"numberOfFailedAuthQueries"`
}

IndexerStatistic contains usage statistics for a single indexer.

type IndexerStats

type IndexerStats struct {
	ID         int                  `json:"id"`
	Indexers   []IndexerStatistic   `json:"indexers,omitempty"`
	UserAgents []UserAgentStatistic `json:"userAgents,omitempty"`
	Hosts      []HostStatistic      `json:"hosts,omitempty"`
}

IndexerStats contains aggregated statistics for all indexers.

type IndexerStatus

type IndexerStatus struct {
	ID                int    `json:"id"`
	IndexerID         int    `json:"indexerId"`
	DisabledTill      string `json:"disabledTill,omitempty"`
	MostRecentFailure string `json:"mostRecentFailure,omitempty"`
	InitialFailure    string `json:"initialFailure,omitempty"`
}

IndexerStatus represents the current status of an indexer.

type IndexerStatusDetail

type IndexerStatusDetail struct {
	ID                int    `json:"id"`
	IndexerID         int    `json:"indexerId"`
	DisabledTill      string `json:"disabledTill,omitempty"`
	MostRecentFailure string `json:"mostRecentFailure,omitempty"`
	InitialFailure    string `json:"initialFailure,omitempty"`
}

IndexerStatusDetail is the inline status embedded in an IndexerResource.

type LocalizationOption added in v1.1.0

type LocalizationOption struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

LocalizationOption represents a localization language option.

type ProviderMessage

type ProviderMessage struct {
	Message string `json:"message,omitempty"`
	Type    string `json:"type,omitempty"`
}

ProviderMessage contains informational or warning messages from a provider.

type Release

type Release struct {
	ID               int               `json:"id"`
	GUID             string            `json:"guid,omitempty"`
	Age              int               `json:"age"`
	AgeHours         float64           `json:"ageHours"`
	AgeMinutes       float64           `json:"ageMinutes"`
	Size             int64             `json:"size"`
	Files            *int              `json:"files,omitempty"`
	Grabs            *int              `json:"grabs,omitempty"`
	IndexerID        int               `json:"indexerId"`
	Indexer          string            `json:"indexer,omitempty"`
	Title            string            `json:"title,omitempty"`
	SortTitle        string            `json:"sortTitle,omitempty"`
	ImdbID           int               `json:"imdbId,omitempty"`
	TmdbID           int               `json:"tmdbId,omitempty"`
	TvdbID           int               `json:"tvdbId,omitempty"`
	PublishDate      string            `json:"publishDate,omitempty"`
	CommentURL       string            `json:"commentUrl,omitempty"`
	DownloadURL      string            `json:"downloadUrl,omitempty"`
	InfoURL          string            `json:"infoUrl,omitempty"`
	PosterURL        string            `json:"posterUrl,omitempty"`
	IndexerFlags     []string          `json:"indexerFlags,omitempty"`
	Categories       []IndexerCategory `json:"categories,omitempty"`
	MagnetURL        string            `json:"magnetUrl,omitempty"`
	InfoHash         string            `json:"infoHash,omitempty"`
	Seeders          *int              `json:"seeders,omitempty"`
	Leechers         *int              `json:"leechers,omitempty"`
	Protocol         string            `json:"protocol,omitempty"`
	FileName         string            `json:"fileName,omitempty"`
	DownloadClientID *int              `json:"downloadClientId,omitempty"`
}

Release represents a search result from an indexer.

type SearchOptions

type SearchOptions struct {
	Query      string
	Type       string // "search", "tvsearch", "movie", "music", "book"
	IndexerIDs []int
	Categories []int
	Limit      int
	Offset     int
}

SearchOptions configures a search request.

type UserAgentStatistic

type UserAgentStatistic struct {
	UserAgent       string `json:"userAgent,omitempty"`
	NumberOfQueries int    `json:"numberOfQueries"`
	NumberOfGrabs   int    `json:"numberOfGrabs"`
}

UserAgentStatistic contains query/grab stats for a user agent.

Jump to

Keyboard shortcuts

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