sonarr

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 9 Imported by: 18

Documentation

Index

Constants

View Source
const (
	FilterUnknown starr.Filtering = iota
	FilterGrabbed
	FilterSeriesFolderImported
	FilterDownloadFolderImported
	FilterDownloadFailed
	FilterDeleted
	FilterRenamed
	FilterImportFailed
)

Filter values are integers. Given names for ease of discovery. https://github.com/Sonarr/Sonarr/blob/0cb8d93069d6310abd39ee2fe73219e17aa83fe6/src/NzbDrone.Core/History/EpisodeHistory.cs#L34-L41

View Source
const APIver = "v3"

APIver is the Sonarr API version supported by this library.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSeriesInput

type AddSeriesInput struct {
	Monitored         bool           `json:"monitored"`
	SeasonFolder      bool           `json:"seasonFolder,omitempty"`
	UseSceneNumbering bool           `json:"useSceneNumbering,omitempty"`
	ID                int64          `json:"id,omitempty"`
	LanguageProfileID int64          `json:"languageProfileId,omitempty"`
	QualityProfileID  int64          `json:"qualityProfileId,omitempty"`
	TvdbID            int64          `json:"tvdbId,omitempty"`
	ImdbID            string         `json:"imdbId,omitempty"`
	TvMazeID          int64          `json:"tvMazeId,omitempty"`
	TvRageID          int64          `json:"tvRageId,omitempty"`
	Path              string         `json:"path,omitempty"`
	SeriesType        string         `json:"seriesType,omitempty"`
	Title             string         `json:"title,omitempty"`
	TitleSlug         string         `json:"titleSlug,omitempty"`
	RootFolderPath    string         `json:"rootFolderPath,omitempty"`
	Tags              []int          `json:"tags,omitempty"`
	Seasons           []*Season      `json:"seasons,omitempty"`
	Images            []*starr.Image `json:"images,omitempty"`
	// to be used only on POST, not for PUT
	AddOptions *AddSeriesOptions `json:"addOptions,omitempty"`
}

AddSeriesInput is the input for /api/v3/series endpoint.

type AddSeriesOptions

type AddSeriesOptions struct {
	SearchForMissingEpisodes     bool `json:"searchForMissingEpisodes"`
	SearchForCutoffUnmetEpisodes bool `json:"searchForCutoffUnmetEpisodes,omitempty"`
	IgnoreEpisodesWithFiles      bool `json:"ignoreEpisodesWithFiles,omitempty"`
	IgnoreEpisodesWithoutFiles   bool `json:"ignoreEpisodesWithoutFiles,omitempty"`
}

AddSeriesOptions is part of AddSeriesInput.

type AlternateTitle

type AlternateTitle struct {
	SeasonNumber int    `json:"seasonNumber"`
	Title        string `json:"title"`
}

AlternateTitle is part of a AddSeriesInput.

type BlockList added in v1.0.0

type BlockList struct {
	Page          int                `json:"page"`
	PageSize      int                `json:"pageSize"`
	SortKey       string             `json:"sortKey"`
	SortDirection string             `json:"sortDirection"`
	TotalRecords  int                `json:"totalRecords"`
	Records       []*BlockListRecord `json:"records"`
}

BlockList represents the /api/v3/blocklist endpoint.

type BlockListRecord added in v1.0.0

type BlockListRecord struct {
	Series        *Series               `json:"series"`
	Quality       *starr.Quality        `json:"quality"`
	Languages     []*starr.Value        `json:"languages"`
	CustomFormats []*CustomFormatOutput `json:"customFormats"`
	EpisodeIDs    []int64               `json:"episodeIds"`
	ID            int64                 `json:"id"`
	SeriesID      int64                 `json:"seriesId"`
	Date          time.Time             `json:"date"`
	SourceTitle   string                `json:"sourceTitle"`
	Protocol      string                `json:"protocol"`
	Indexer       string                `json:"indexer"`
	Message       string                `json:"message"`
}

BlockListRecord represents a single block list item.

type Calendar added in v1.0.0

type Calendar struct {
	Start                time.Time
	End                  time.Time
	Unmonitored          bool
	IncludeSeries        bool
	IncludeEpisodeFile   bool
	IncludeEpisodeImages bool
}

Calendar defines the filters for fetching calendar items.

type CommandRequest added in v0.9.10

type CommandRequest struct {
	Name       string  `json:"name"`
	Files      []int64 `json:"files,omitempty"` // RenameFiles only
	SeriesIDs  []int64 `json:"seriesIds,omitempty"`
	SeriesID   int64   `json:"seriesId,omitempty"`
	EpisodeIDs []int64 `json:"episodeIds,omitempty"`
	EpisodeID  int64   `json:"episodeId,omitempty"`
}

CommandRequest goes into the /api/v3/command endpoint. This was created from the search command and may not support other commands yet.

type CommandResponse added in v0.9.10

type CommandResponse struct {
	ID                  int64                  `json:"id"`
	Name                string                 `json:"name"`
	CommandName         string                 `json:"commandName"`
	Message             string                 `json:"message,omitempty"`
	Priority            string                 `json:"priority"`
	Status              string                 `json:"status"`
	Queued              time.Time              `json:"queued"`
	Started             time.Time              `json:"started,omitempty"`
	Ended               time.Time              `json:"ended,omitempty"`
	StateChangeTime     time.Time              `json:"stateChangeTime,omitempty"`
	LastExecutionTime   time.Time              `json:"lastExecutionTime,omitempty"`
	Duration            string                 `json:"duration,omitempty"`
	Trigger             string                 `json:"trigger"`
	SendUpdatesToClient bool                   `json:"sendUpdatesToClient"`
	UpdateScheduledTask bool                   `json:"updateScheduledTask"`
	Body                map[string]interface{} `json:"body"`
}

CommandResponse comes from the /api/v3/command endpoint.

type CustomFormatInput added in v1.0.0

type CustomFormatInput struct {
	ID                    int64                    `json:"id,omitempty"`
	Name                  string                   `json:"name"`
	IncludeCFWhenRenaming bool                     `json:"includeCustomFormatWhenRenaming"`
	Specifications        []*CustomFormatInputSpec `json:"specifications"`
}

CustomFormatInput is the input for a new or updated CustomFormat. This data and these endpoints do not exist in Sonarr v3; this is v4 only.

type CustomFormatInputSpec added in v1.0.0

type CustomFormatInputSpec struct {
	Name           string              `json:"name"`
	Implementation string              `json:"implementation"`
	Negate         bool                `json:"negate"`
	Required       bool                `json:"required"`
	Fields         []*starr.FieldInput `json:"fields"`
}

CustomFormatInputSpec is part of a CustomFormatInput.

type CustomFormatOutput added in v1.0.0

type CustomFormatOutput struct {
	ID                    int64                     `json:"id"`
	Name                  string                    `json:"name"`
	IncludeCFWhenRenaming bool                      `json:"includeCustomFormatWhenRenaming"`
	Specifications        []*CustomFormatOutputSpec `json:"specifications"`
}

CustomFormatOutput is the output from the CustomFormat methods.

type CustomFormatOutputSpec added in v1.0.0

type CustomFormatOutputSpec struct {
	Name               string               `json:"name"`
	Implementation     string               `json:"implementation"`
	ImplementationName string               `json:"implementationName"`
	InfoLink           string               `json:"infoLink"`
	Negate             bool                 `json:"negate"`
	Required           bool                 `json:"required"`
	Fields             []*starr.FieldOutput `json:"fields"`
}

CustomFormatOutputSpec is part of a CustomFormatOutput.

type DelayProfile added in v1.0.0

type DelayProfile struct {
	EnableUsenet           bool   `json:"enableUsenet,omitempty"`
	EnableTorrent          bool   `json:"enableTorrent,omitempty"`
	BypassIfHighestQuality bool   `json:"bypassIfHighestQuality,omitempty"`
	UsenetDelay            int64  `json:"usenetDelay,omitempty"`
	TorrentDelay           int64  `json:"torrentDelay,omitempty"`
	ID                     int64  `json:"id,omitempty"`
	Order                  int64  `json:"order,omitempty"`
	Tags                   []int  `json:"tags"`
	PreferredProtocol      string `json:"preferredProtocol,omitempty"`
}

DelayProfile is the /api/v3/delayprofile endpoint.

type DownloadClientConfig added in v1.0.0

type DownloadClientConfig struct {
	EnableCompletedDownloadHandling bool   `json:"enableCompletedDownloadHandling"`
	AutoRedownloadFailed            bool   `json:"autoRedownloadFailed"`
	ID                              int64  `json:"id"`
	DownloadClientWorkingFolders    string `json:"downloadClientWorkingFolders"`
}

DownloadClientConfig is the /api/v3/config/downloadClientConfig endpoint.

type DownloadClientInput added in v1.0.0

type DownloadClientInput struct {
	Enable                   bool                `json:"enable"`
	RemoveCompletedDownloads bool                `json:"removeCompletedDownloads"`
	RemoveFailedDownloads    bool                `json:"removeFailedDownloads"`
	Priority                 int                 `json:"priority"`
	ID                       int64               `json:"id,omitempty"`
	ConfigContract           string              `json:"configContract"`
	Implementation           string              `json:"implementation"`
	Name                     string              `json:"name"`
	Protocol                 string              `json:"protocol"`
	Tags                     []int               `json:"tags"`
	Fields                   []*starr.FieldInput `json:"fields"`
}

DownloadClientInput is the input for a new or updated download client.

type DownloadClientOutput added in v1.0.0

type DownloadClientOutput struct {
	Enable                   bool                 `json:"enable"`
	RemoveCompletedDownloads bool                 `json:"removeCompletedDownloads"`
	RemoveFailedDownloads    bool                 `json:"removeFailedDownloads"`
	Priority                 int                  `json:"priority"`
	ID                       int64                `json:"id,omitempty"`
	ConfigContract           string               `json:"configContract"`
	Implementation           string               `json:"implementation"`
	ImplementationName       string               `json:"implementationName"`
	InfoLink                 string               `json:"infoLink"`
	Name                     string               `json:"name"`
	Protocol                 string               `json:"protocol"`
	Tags                     []int                `json:"tags"`
	Fields                   []*starr.FieldOutput `json:"fields"`
}

DownloadClientOutput is the output from the download client methods.

type Episode added in v0.10.2

type Episode struct {
	ID                       int64          `json:"id"`
	SeriesID                 int64          `json:"seriesId"`
	TvdbID                   int64          `json:"tvdbId"`
	AbsoluteEpisodeNumber    int64          `json:"absoluteEpisodeNumber"`
	EpisodeFileID            int64          `json:"episodeFileId"`
	SeasonNumber             int64          `json:"seasonNumber"`
	EpisodeNumber            int64          `json:"episodeNumber"`
	AirDateUtc               time.Time      `json:"airDateUtc"`
	AirDate                  string         `json:"airDate"`
	Title                    string         `json:"title"`
	Overview                 string         `json:"overview"`
	UnverifiedSceneNumbering bool           `json:"unverifiedSceneNumbering"`
	HasFile                  bool           `json:"hasFile"`
	Monitored                bool           `json:"monitored"`
	Images                   []*starr.Image `json:"images"`
	Series                   *Series        `json:"series"`
}

Episode is the /api/v3/episode endpoint.

type EpisodeFile added in v0.14.0

type EpisodeFile struct {
	ID                   int64                 `json:"id"`
	SeriesID             int64                 `json:"seriesId"`
	SeasonNumber         int                   `json:"seasonNumber"`
	RelativePath         string                `json:"relativePath"`
	Path                 string                `json:"path"`
	Size                 int64                 `json:"size"`
	DateAdded            time.Time             `json:"dateAdded"`
	SceneName            string                `json:"sceneName"`
	ReleaseGroup         string                `json:"releaseGroup"`
	Language             *starr.Value          `json:"language"`
	Quality              *starr.Quality        `json:"quality"`
	MediaInfo            *MediaInfo            `json:"mediaInfo"`
	QualityCutoffNotMet  bool                  `json:"qualityCutoffNotMet"`
	LanguageCutoffNotMet bool                  `json:"languageCutoffNotMet"`
	CustomFormats        []*CustomFormatOutput `json:"customFormats"` // v4 only
}

EpisodeFile is the output from the /api/v3/episodeFile endpoint.

type Exclusion added in v1.0.0

type Exclusion struct {
	TVDBID int64  `json:"tvdbId"`
	Title  string `json:"title"`
	ID     int64  `json:"id,omitempty"`
}

Exclusion is a Sonarr excluded item.

type History added in v0.10.6

type History struct {
	Page          int              `json:"page"`
	PageSize      int              `json:"pageSize"`
	SortKey       string           `json:"sortKey"`
	SortDirection string           `json:"sortDirection"`
	TotalRecords  int              `json:"totalRecords"`
	Records       []*HistoryRecord `json:"records"`
}

History is the data from the /api/v3/history endpoint.

type HistoryRecord added in v0.10.6

type HistoryRecord struct {
	ID                   int64          `json:"id"`
	EpisodeID            int64          `json:"episodeId"`
	SeriesID             int64          `json:"seriesId"`
	SourceTitle          string         `json:"sourceTitle"`
	Language             Language       `json:"language"`
	Quality              *starr.Quality `json:"quality"`
	QualityCutoffNotMet  bool           `json:"qualityCutoffNotMet"`
	LanguageCutoffNotMet bool           `json:"languageCutoffNotMet"`
	Date                 time.Time      `json:"date"`
	DownloadID           string         `json:"downloadId,omitempty"`
	EventType            string         `json:"eventType"`
	Data                 struct {
		Age                string    `json:"age"`
		AgeHours           string    `json:"ageHours"`
		AgeMinutes         string    `json:"ageMinutes"`
		DownloadClient     string    `json:"downloadClient"`
		DownloadClientName string    `json:"downloadClientName"`
		DownloadURL        string    `json:"downloadUrl"`
		DroppedPath        string    `json:"droppedPath"`
		FileID             string    `json:"fileId"`
		GUID               string    `json:"guid"`
		ImportedPath       string    `json:"importedPath"`
		Indexer            string    `json:"indexer"`
		Message            string    `json:"message"`
		NzbInfoURL         string    `json:"nzbInfoUrl"`
		PreferredWordScore string    `json:"preferredWordScore"`
		Protocol           string    `json:"protocol"`
		PublishedDate      time.Time `json:"publishedDate"`
		Reason             string    `json:"reason"`
		ReleaseGroup       string    `json:"releaseGroup"`
		Size               string    `json:"size"`
		TorrentInfoHash    string    `json:"torrentInfoHash"`
		TvRageID           string    `json:"tvRageId"`
		TvdbID             string    `json:"tvdbId"`
	} `json:"data"`
}

HistoryRecord is part of the History data. Not all items have all Data members. Check EventType for what you need.

type ImportListInput added in v1.0.0

type ImportListInput struct {
	EnableAutomaticAdd bool                `json:"enableAutomaticAdd"`
	SeasonFolder       bool                `json:"seasonFolder"`
	ListOrder          int                 `json:"listOrder"`
	QualityProfileID   int64               `json:"qualityProfileId,omitempty"`
	ID                 int64               `json:"id,omitempty"` // update only.
	ConfigContract     string              `json:"configContract,omitempty"`
	Implementation     string              `json:"implementation,omitempty"`
	ImplementationName string              `json:"implementationName,omitempty"`
	InfoLink           string              `json:"infoLink,omitempty"`
	ListType           string              `json:"listType,omitempty"`
	MinRefreshInterval string              `json:"minRefreshInterval,omitempty"`
	Name               string              `json:"name,omitempty"`
	RootFolderPath     string              `json:"rootFolderPath,omitempty"`
	SeriesType         string              `json:"seriesType,omitempty"`
	ShouldMonitor      string              `json:"shouldMonitor,omitempty"`
	Tags               []int               `json:"tags,omitempty"`
	Fields             []*starr.FieldInput `json:"fields,omitempty"`
}

ImportListInput is the input for a new or updated import list.

type ImportListOutput added in v1.0.0

type ImportListOutput struct {
	EnableAutomaticAdd bool                 `json:"enableAutomaticAdd"`
	SeasonFolder       bool                 `json:"seasonFolder"`
	QualityProfileID   int64                `json:"qualityProfileId"`
	ListOrder          int64                `json:"listOrder"`
	ID                 int64                `json:"id"`
	ConfigContract     string               `json:"configContract"`
	Implementation     string               `json:"implementation"`
	ImplementationName string               `json:"implementationName"`
	InfoLink           string               `json:"infoLink"`
	ListType           string               `json:"listType"`
	MinRefreshInterval string               `json:"minRefreshInterval"`
	Name               string               `json:"name"`
	RootFolderPath     string               `json:"rootFolderPath"`
	SeriesType         string               `json:"seriesType"`
	ShouldMonitor      string               `json:"shouldMonitor"`
	Tags               []int                `json:"tags"`
	Fields             []*starr.FieldOutput `json:"fields"`
}

ImportListOutput is the output from the import list methods.

type IndexerConfig added in v1.0.0

type IndexerConfig struct {
	ID              int64 `json:"id"`
	MaximumSize     int64 `json:"maximumSize"`
	MinimumAge      int64 `json:"minimumAge"`
	Retention       int64 `json:"retention"`
	RssSyncInterval int64 `json:"rssSyncInterval"`
}

IndexerConfig represents the /config/indexer endpoint.

type IndexerInput added in v1.0.0

type IndexerInput struct {
	EnableAutomaticSearch   bool                `json:"enableAutomaticSearch"`
	EnableInteractiveSearch bool                `json:"enableInteractiveSearch"`
	EnableRss               bool                `json:"enableRss"`
	DownloadClientID        int64               `json:"downloadClientId"`
	Priority                int64               `json:"priority"`
	ID                      int64               `json:"id,omitempty"`
	ConfigContract          string              `json:"configContract"`
	Implementation          string              `json:"implementation"`
	Name                    string              `json:"name"`
	Protocol                string              `json:"protocol"`
	Tags                    []int               `json:"tags"`
	Fields                  []*starr.FieldInput `json:"fields"`
}

IndexerInput is the input for a new or updated indexer.

type IndexerOutput added in v1.0.0

type IndexerOutput struct {
	EnableAutomaticSearch   bool                 `json:"enableAutomaticSearch"`
	EnableInteractiveSearch bool                 `json:"enableInteractiveSearch"`
	EnableRss               bool                 `json:"enableRss"`
	SupportsRss             bool                 `json:"supportsRss"`
	SupportsSearch          bool                 `json:"supportsSearch"`
	DownloadClientID        int64                `json:"downloadClientId"`
	Priority                int64                `json:"priority"`
	ID                      int64                `json:"id,omitempty"`
	ConfigContract          string               `json:"configContract"`
	Implementation          string               `json:"implementation"`
	ImplementationName      string               `json:"implementationName"`
	InfoLink                string               `json:"infoLink"`
	Name                    string               `json:"name"`
	Protocol                string               `json:"protocol"`
	Tags                    []int                `json:"tags"`
	Fields                  []*starr.FieldOutput `json:"fields"`
}

IndexerOutput is the output from the indexer methods.

type Language

type Language struct {
	Allowed  bool         `json:"allowed"`
	Language *starr.Value `json:"language"`
}

Language is part of LanguageProfile.

type LanguageProfile

type LanguageProfile struct {
	UpgradeAllowed bool         `json:"upgradeAllowed"`
	ID             int64        `json:"id,omitempty"`
	Name           string       `json:"name"`
	Cutoff         *starr.Value `json:"cutoff"`
	Languages      []Language   `json:"languages"`
}

LanguageProfile is the /api/v3/languageprofile endpoint.

type ManualImportInput added in v1.0.0

type ManualImportInput struct {
	ID                int64                `json:"id"`
	Path              string               `json:"path"`
	SeriesID          int64                `json:"seriesId"`
	SeasonNumber      int                  `json:"seasonNumber"`
	Episodes          []*Episode           `json:"episodes"`
	EpisodeIDs        []int64              `json:"episodeIds"`
	Quality           *starr.Quality       `json:"quality"`
	Languages         []*starr.Value       `json:"languages"`
	ReleaseGroup      string               `json:"releaseGroup"`
	DownloadID        string               `json:"downloadId"`
	CustomFormats     []*CustomFormatInput `json:"customFormats"`
	CustomFormatScore int64                `json:"customFormatScore"`
	Rejections        []*Rejection         `json:"rejections"`
}

ManualImportInput is the input data for a manual import request using a POST request.

type ManualImportOutput added in v1.0.0

type ManualImportOutput struct {
	ID                int64                 `json:"id"`
	Path              string                `json:"path"`
	RelativePath      string                `json:"relativePath"`
	FolderName        string                `json:"folderName"`
	Name              string                `json:"name"`
	Size              int                   `json:"size"`
	Series            *Series               `json:"series"`
	SeasonNumber      int                   `json:"seasonNumber"`
	Episodes          []*Episode            `json:"episodes"`
	EpisodeFileID     int64                 `json:"episodeFileId"`
	Quality           *starr.Quality        `json:"quality"`
	Languages         []*starr.Value        `json:"languages"`
	ReleaseGroup      string                `json:"releaseGroup"`
	QualityWeight     int64                 `json:"qualityWeight"`
	DownloadID        string                `json:"downloadId"`
	CustomFormats     []*CustomFormatOutput `json:"customFormats"`
	CustomFormatScore int64                 `json:"customFormatScore"`
	Rejections        []*Rejection          `json:"rejections"`
}

ManualImportOutput is the output data for a manual import request.

type ManualImportParams added in v1.0.0

type ManualImportParams struct {
	Folder              string
	DownloadID          string
	SeriesID            int64
	SeasonNumber        int
	FilterExistingFiles bool
}

ManualImportParams provides the input parameters for the GET /manualimport API.

type MediaInfo added in v0.14.0

type MediaInfo struct {
	AudioBitrate     int            `json:"audioBitrate"`
	AudioChannels    float64        `json:"audioChannels"`
	AudioCodec       string         `json:"audioCodec"`
	AudioLanguages   string         `json:"audioLanguages"`
	AudioStreamCount int            `json:"audioStreamCount"`
	VideoBitDepth    int            `json:"videoBitDepth"`
	VideoBitrate     int            `json:"videoBitrate"`
	VideoCodec       string         `json:"videoCodec"`
	VideoFPS         float64        `json:"videoFps"`
	Resolution       string         `json:"resolution"`
	RunTime          starr.PlayTime `json:"runTime"`
	ScanType         string         `json:"scanType"`
	Subtitles        string         `json:"subtitles"`
}

MediaInfo is part of an EpisodeFile.

type MediaManagement added in v1.0.0

type MediaManagement struct {
	AutoUnmonitorPreviouslyDownloadedEpisodes bool   `json:"autoUnmonitorPreviouslyDownloadedEpisodes,omitempty"`
	CopyUsingHardlinks                        bool   `json:"copyUsingHardlinks,omitempty"`
	CreateEmptySeriesFolders                  bool   `json:"createEmptySeriesFolders,omitempty"`
	DeleteEmptyFolders                        bool   `json:"deleteEmptyFolders,omitempty"`
	EnableMediaInfo                           bool   `json:"enableMediaInfo,omitempty"`
	ImportExtraFiles                          bool   `json:"importExtraFiles,omitempty"`
	SetPermissionsLinux                       bool   `json:"setPermissionsLinux,omitempty"`
	SkipFreeSpaceCheckWhenImporting           bool   `json:"skipFreeSpaceCheckWhenImporting,omitempty"`
	ID                                        int64  `json:"id"`
	MinimumFreeSpaceWhenImporting             int64  `json:"minimumFreeSpaceWhenImporting"` // 0 or empty not allowed
	RecycleBinCleanupDays                     int64  `json:"recycleBinCleanupDays,omitempty"`
	ChmodFolder                               string `json:"chmodFolder,omitempty"`
	ChownGroup                                string `json:"chownGroup"` // empty string is valid
	DownloadPropersAndRepacks                 string `json:"downloadPropersAndRepacks,omitempty"`
	EpisodeTitleRequired                      string `json:"episodeTitleRequired,omitempty"`
	ExtraFileExtensions                       string `json:"extraFileExtensions,omitempty"`
	FileDate                                  string `json:"fileDate,omitempty"`
	RecycleBin                                string `json:"recycleBin"` // empty string is valid
	RescanAfterRefresh                        string `json:"rescanAfterRefresh,omitempty"`
}

MediaManagement represents the /config/mediamanagement endpoint.

type MonitoredSeries added in v0.14.0

type MonitoredSeries struct {
	ID        int  `json:"id"`
	Monitored bool `json:"monitored"`
}

MonitoredSeries is part of the SeasonPass payload.

type MonitoringOptions added in v0.14.0

type MonitoringOptions struct {
	// Valid values for Monitor are: all, future, missing, existing, firstSeason, latestSeason, and none.
	Monitor string `json:"monitor"`
}

MonitoringOptions is part of the SeasonPass payload.

type Naming added in v1.0.0

type Naming struct {
	RenameEpisodes           bool   `json:"renameEpisodes,omitempty"`
	ReplaceIllegalCharacters bool   `json:"replaceIllegalCharacters,omitempty"`
	IncludeQuality           bool   `json:"includeQuality,omitempty"`
	IncludeSeriesTitle       bool   `json:"includeSeriesTitle,omitempty"`
	IncludeEpisodeTitle      bool   `json:"includeEpisodeTitle,omitempty"`
	ReplaceSpaces            bool   `json:"replaceSpaces,omitempty"`
	ID                       int64  `json:"id,omitempty"`
	MultiEpisodeStyle        int64  `json:"multiEpisodeStyle,omitempty"`
	Separator                string `json:"separator,omitempty"`
	NumberStyle              string `json:"numberStyle,omitempty"`
	DailyEpisodeFormat       string `json:"dailyEpisodeFormat,omitempty"`
	AnimeEpisodeFormat       string `json:"animeEpisodeFormat,omitempty"`
	SeriesFolderFormat       string `json:"seriesFolderFormat,omitempty"`
	SeasonFolderFormat       string `json:"seasonFolderFormat,omitempty"`
	SpecialsFolderFormat     string `json:"specialsFolderFormat,omitempty"`
	StandardEpisodeFormat    string `json:"standardEpisodeFormat,omitempty"`
}

Naming represents the config/naming endpoint in Sonarr.

type NotificationInput added in v1.0.0

type NotificationInput struct {
	OnGrab                        bool                `json:"onGrab,omitempty"`
	OnDownload                    bool                `json:"onDownload,omitempty"`
	OnUpgrade                     bool                `json:"onUpgrade,omitempty"`
	OnRename                      bool                `json:"onRename,omitempty"`
	OnSeriesDelete                bool                `json:"onSeriesDelete,omitempty"`
	OnEpisodeFileDelete           bool                `json:"onEpisodeFileDelete,omitempty"`
	OnEpisodeFileDeleteForUpgrade bool                `json:"onEpisodeFileDeleteForUpgrade,omitempty"`
	OnHealthIssue                 bool                `json:"onHealthIssue,omitempty"`
	OnApplicationUpdate           bool                `json:"onApplicationUpdate,omitempty"`
	IncludeHealthWarnings         bool                `json:"includeHealthWarnings,omitempty"`
	ID                            int64               `json:"id,omitempty"`
	Name                          string              `json:"name"`
	Implementation                string              `json:"implementation"`
	ConfigContract                string              `json:"configContract"`
	Tags                          []int               `json:"tags,omitempty"`
	Fields                        []*starr.FieldInput `json:"fields"`
}

NotificationInput is the input for a new or updated notification.

type NotificationOutput added in v1.0.0

type NotificationOutput struct {
	OnGrab                                bool                 `json:"onGrab"`
	OnDownload                            bool                 `json:"onDownload"`
	OnUpgrade                             bool                 `json:"onUpgrade"`
	OnRename                              bool                 `json:"onRename"`
	OnSeriesDelete                        bool                 `json:"onSeriesDelete"`
	OnEpisodeFileDelete                   bool                 `json:"onEpisodeFileDelete"`
	OnEpisodeFileDeleteForUpgrade         bool                 `json:"onEpisodeFileDeleteForUpgrade"`
	OnHealthIssue                         bool                 `json:"onHealthIssue"`
	OnApplicationUpdate                   bool                 `json:"onApplicationUpdate"`
	SupportsOnGrab                        bool                 `json:"supportsOnGrab"`
	SupportsOnDownload                    bool                 `json:"supportsOnDownload"`
	SupportsOnUpgrade                     bool                 `json:"supportsOnUpgrade"`
	SupportsOnRename                      bool                 `json:"supportsOnRename"`
	SupportsOnSeriesDelete                bool                 `json:"supportsOnSeriesDelete"`
	SupportsOnEpisodeFileDelete           bool                 `json:"supportsOnEpisodeFileDelete"`
	SupportsOnEpisodeFileDeleteForUpgrade bool                 `json:"supportsOnEpisodeFileDeleteForUpgrade"`
	SupportsOnHealthIssue                 bool                 `json:"supportsOnHealthIssue"`
	SupportsOnApplicationUpdate           bool                 `json:"supportsOnApplicationUpdate"`
	IncludeHealthWarnings                 bool                 `json:"includeHealthWarnings"`
	ID                                    int64                `json:"id"`
	Name                                  string               `json:"name"`
	ImplementationName                    string               `json:"implementationName"`
	Implementation                        string               `json:"implementation"`
	ConfigContract                        string               `json:"configContract"`
	InfoLink                              string               `json:"infoLink"`
	Tags                                  []int                `json:"tags"`
	Fields                                []*starr.FieldOutput `json:"fields"`
}

NotificationOutput is the output from the notification methods.

type QualityDefinition added in v1.0.0

type QualityDefinition struct {
	ID       int64              `json:"id,omitempty"`
	Weight   int64              `json:"weight"` // This should not be changed.
	MinSize  float64            `json:"minSize"`
	MaxSize  float64            `json:"maxSize"`
	PrefSize float64            `json:"preferredSize"` // v4 only.
	Title    string             `json:"title"`
	Quality  *starr.BaseQuality `json:"quality"`
}

QualityDefinition is the /api/v3/qualitydefinition endpoint.

type QualityProfile

type QualityProfile struct {
	UpgradeAllowed    bool                `json:"upgradeAllowed"`
	ID                int64               `json:"id"`
	Cutoff            int64               `json:"cutoff"`
	Name              string              `json:"name"`
	Qualities         []*starr.Quality    `json:"items"`
	MinFormatScore    int64               `json:"minFormatScore"`        // v4 only.
	CutoffFormatScore int64               `json:"cutoffFormatScore"`     // v4 only.
	FormatItems       []*starr.FormatItem `json:"formatItems,omitempty"` // v4 only.
	Language          *starr.Value        `json:"language,omitempty"`    // v4 only.
}

QualityProfile is the /api/v3/qualityprofile endpoint.

type Queue

type Queue struct {
	Page          int            `json:"page"`
	PageSize      int            `json:"pageSize"`
	SortKey       string         `json:"sortKey"`
	SortDirection string         `json:"sortDirection"`
	TotalRecords  int            `json:"totalRecords"`
	Records       []*QueueRecord `json:"records"`
}

Queue is the /api/v3/queue endpoint.

type QueueRecord

type QueueRecord struct {
	ID                      int64                  `json:"id"`
	SeriesID                int64                  `json:"seriesId"`
	EpisodeID               int64                  `json:"episodeId"`
	Language                *starr.Value           `json:"language"`
	Quality                 *starr.Quality         `json:"quality"`
	Size                    float64                `json:"size"`
	Title                   string                 `json:"title"`
	Sizeleft                float64                `json:"sizeleft"`
	Timeleft                string                 `json:"timeleft"`
	EstimatedCompletionTime time.Time              `json:"estimatedCompletionTime"`
	Status                  string                 `json:"status"`
	TrackedDownloadStatus   string                 `json:"trackedDownloadStatus"`
	TrackedDownloadState    string                 `json:"trackedDownloadState"`
	StatusMessages          []*starr.StatusMessage `json:"statusMessages"`
	DownloadID              string                 `json:"downloadId"`
	Protocol                string                 `json:"protocol"`
	DownloadClient          string                 `json:"downloadClient"`
	Indexer                 string                 `json:"indexer"`
	OutputPath              string                 `json:"outputPath"`
	ErrorMessage            string                 `json:"errorMessage"`
}

QueueRecord is part of Queue.

type Rejection added in v1.0.0

type Rejection struct {
	Reason string `json:"reason"`
	// permanent or temporary
	Type string `json:"type"`
}

Rejection is part of the manual import payload.

type ReleaseProfile added in v0.9.11

type ReleaseProfile struct {
	Name            string            `json:"name"`
	Enabled         bool              `json:"enabled"`
	Required        []string          `json:"required"`
	Ignored         []string          `json:"ignored"`
	IndexerID       int64             `json:"indexerId"`
	Tags            []int             `json:"tags"`
	ID              int64             `json:"id,omitempty"`
	IncPrefOnRename *bool             `json:"includePreferredWhenRenaming,omitempty"` // V3 only, removed from v4.
	Preferred       []*starr.KeyValue `json:"preferred,omitempty"`                    // V3 only, removed from v4.
}

ReleaseProfile defines a release profile's data from Sonarr.

type RootFolder

type RootFolder struct {
	Accessible      bool          `json:"accessible,omitempty"`
	ID              int64         `json:"id,omitempty"`
	FreeSpace       int64         `json:"freeSpace,omitempty"`
	Path            string        `json:"path"`
	UnmappedFolders []*starr.Path `json:"unmappedFolders,omitempty"`
}

RootFolder is the /api/v3/rootfolder endpoint.

type Season

type Season struct {
	Monitored    bool        `json:"monitored"`
	SeasonNumber int         `json:"seasonNumber"`
	Statistics   *Statistics `json:"statistics,omitempty"`
}

Season is part of AddSeriesInput and Queue and used in a few places.

type SeasonPass added in v0.14.0

type SeasonPass struct {
	Series            []*MonitoredSeries `json:"series"`
	MonitoringOptions *MonitoringOptions `json:"monitoringOptions"`
}

SeasonPass is the input payload for a seasonPass update.

type Series

type Series struct {
	Ended             bool              `json:"ended,omitempty"`
	Monitored         bool              `json:"monitored"`
	SeasonFolder      bool              `json:"seasonFolder,omitempty"`
	UseSceneNumbering bool              `json:"useSceneNumbering,omitempty"`
	Runtime           int               `json:"runtime,omitempty"`
	Year              int               `json:"year,omitempty"`
	ID                int64             `json:"id,omitempty"`
	LanguageProfileID int64             `json:"languageProfileId,omitempty"`
	QualityProfileID  int64             `json:"qualityProfileId,omitempty"`
	TvdbID            int64             `json:"tvdbId,omitempty"`
	TvMazeID          int64             `json:"tvMazeId,omitempty"`
	TvRageID          int64             `json:"tvRageId,omitempty"`
	AirTime           string            `json:"airTime,omitempty"`
	Certification     string            `json:"certification,omitempty"`
	CleanTitle        string            `json:"cleanTitle,omitempty"`
	ImdbID            string            `json:"imdbId,omitempty"`
	Network           string            `json:"network,omitempty"`
	Overview          string            `json:"overview,omitempty"`
	Path              string            `json:"path,omitempty"`
	SeriesType        string            `json:"seriesType,omitempty"`
	SortTitle         string            `json:"sortTitle,omitempty"`
	Status            string            `json:"status,omitempty"`
	Title             string            `json:"title,omitempty"`
	TitleSlug         string            `json:"titleSlug,omitempty"`
	RootFolderPath    string            `json:"rootFolderPath,omitempty"`
	Added             time.Time         `json:"added,omitempty"`
	FirstAired        time.Time         `json:"firstAired,omitempty"`
	NextAiring        time.Time         `json:"nextAiring,omitempty"`
	PreviousAiring    time.Time         `json:"previousAiring,omitempty"`
	Ratings           *starr.Ratings    `json:"ratings,omitempty"`
	Statistics        *Statistics       `json:"statistics,omitempty"`
	Tags              []int             `json:"tags,omitempty"`
	Genres            []string          `json:"genres,omitempty"`
	AlternateTitles   []*AlternateTitle `json:"alternateTitles,omitempty"`
	Seasons           []*Season         `json:"seasons,omitempty"`
	Images            []*starr.Image    `json:"images,omitempty"`
}

Series is the output of /api/v3/series endpoint.

type Sonarr

type Sonarr struct {
	starr.APIer
}

Sonarr contains all the methods to interact with a Sonarr server.

func New

func New(config *starr.Config) *Sonarr

New returns a Sonarr object used to interact with the Sonarr API.

func (*Sonarr) AddCustomFormat added in v1.0.0

func (s *Sonarr) AddCustomFormat(format *CustomFormatInput) (*CustomFormatOutput, error)

AddCustomFormat creates a new custom format and returns the response (with ID). This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) AddCustomFormatContext added in v1.0.0

func (s *Sonarr) AddCustomFormatContext(ctx context.Context, format *CustomFormatInput) (*CustomFormatOutput, error)

AddCustomFormatContext creates a new custom format and returns the response (with ID). This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) AddDelayProfile added in v1.0.0

func (s *Sonarr) AddDelayProfile(profile *DelayProfile) (*DelayProfile, error)

AddDelayProfile creates a delay profile. AddDelayProfile doesn't take into account the "order" field sent on creation. Order will be set to first available. This can only be edited via UpdateDelayProfile later on.

func (*Sonarr) AddDelayProfileContext added in v1.0.0

func (s *Sonarr) AddDelayProfileContext(ctx context.Context, profile *DelayProfile) (*DelayProfile, error)

AddDelayProfileContext creates a delay profile.

func (*Sonarr) AddDownloadClient added in v1.0.0

func (s *Sonarr) AddDownloadClient(downloadclient *DownloadClientInput) (*DownloadClientOutput, error)

AddDownloadClient creates a download client.

func (*Sonarr) AddDownloadClientContext added in v1.0.0

func (s *Sonarr) AddDownloadClientContext(ctx context.Context,
	client *DownloadClientInput,
) (*DownloadClientOutput, error)

AddDownloadClientContext creates a download client.

func (*Sonarr) AddImportList added in v1.0.0

func (s *Sonarr) AddImportList(importList *ImportListInput) (*ImportListOutput, error)

AddImportList creates a import list.

func (*Sonarr) AddImportListContext added in v1.0.0

func (s *Sonarr) AddImportListContext(ctx context.Context, importList *ImportListInput) (*ImportListOutput, error)

AddImportListContext creates a import list.

func (*Sonarr) AddIndexer added in v1.0.0

func (s *Sonarr) AddIndexer(indexer *IndexerInput) (*IndexerOutput, error)

AddIndexer creates a indexer.

func (*Sonarr) AddIndexerContext added in v1.0.0

func (s *Sonarr) AddIndexerContext(ctx context.Context, indexer *IndexerInput) (*IndexerOutput, error)

AddIndexerContext creates a indexer.

func (*Sonarr) AddLanguageProfile added in v1.0.0

func (s *Sonarr) AddLanguageProfile(profile *LanguageProfile) (*LanguageProfile, error)

AddLanguageProfile creates a language profile.

func (*Sonarr) AddLanguageProfileContext added in v1.0.0

func (s *Sonarr) AddLanguageProfileContext(ctx context.Context, profile *LanguageProfile) (*LanguageProfile, error)

AddLanguageProfileContext creates a language profile.

func (*Sonarr) AddNotification added in v1.0.0

func (s *Sonarr) AddNotification(notification *NotificationInput) (*NotificationOutput, error)

AddNotification creates a notification.

func (*Sonarr) AddNotificationContext added in v1.0.0

func (s *Sonarr) AddNotificationContext(ctx context.Context, client *NotificationInput) (*NotificationOutput, error)

AddNotificationContext creates a notification.

func (*Sonarr) AddQualityProfile added in v0.9.11

func (s *Sonarr) AddQualityProfile(profile *QualityProfile) (*QualityProfile, error)

AddQualityProfile creates a quality profile.

func (*Sonarr) AddQualityProfileContext added in v0.13.0

func (s *Sonarr) AddQualityProfileContext(ctx context.Context, profile *QualityProfile) (*QualityProfile, error)

AddQualityProfileContext creates a quality profile.

func (*Sonarr) AddReleaseProfile added in v0.9.11

func (s *Sonarr) AddReleaseProfile(profile *ReleaseProfile) (*ReleaseProfile, error)

AddReleaseProfile creates a release profile.

func (*Sonarr) AddReleaseProfileContext added in v0.13.0

func (s *Sonarr) AddReleaseProfileContext(ctx context.Context, profile *ReleaseProfile) (*ReleaseProfile, error)

AddReleaseProfileContext creates a release profile.

func (*Sonarr) AddRemotePathMapping added in v1.0.0

func (s *Sonarr) AddRemotePathMapping(mapping *starr.RemotePathMapping) (*starr.RemotePathMapping, error)

AddRemotePathMapping creates a remote path mapping.

func (*Sonarr) AddRemotePathMappingContext added in v1.0.0

func (s *Sonarr) AddRemotePathMappingContext(ctx context.Context,
	mapping *starr.RemotePathMapping,
) (*starr.RemotePathMapping, error)

AddRemotePathMappingContext creates a remote path mapping.

func (*Sonarr) AddRootFolder added in v1.0.0

func (s *Sonarr) AddRootFolder(folder *RootFolder) (*RootFolder, error)

AddRootFolder creates a root folder.

func (*Sonarr) AddRootFolderContext added in v1.0.0

func (s *Sonarr) AddRootFolderContext(ctx context.Context, folder *RootFolder) (*RootFolder, error)

AddRootFolderContext creates a root folder.

func (*Sonarr) AddSeries

func (s *Sonarr) AddSeries(series *AddSeriesInput) (*Series, error)

AddSeries adds a new series to Sonarr.

func (*Sonarr) AddSeriesContext added in v0.13.0

func (s *Sonarr) AddSeriesContext(ctx context.Context, series *AddSeriesInput) (*Series, error)

AddSeriesContext adds a new series to Sonarr.

func (*Sonarr) AddTag

func (s *Sonarr) AddTag(tag *starr.Tag) (*starr.Tag, error)

AddTag creates a tag.

func (*Sonarr) AddTagContext added in v0.13.0

func (s *Sonarr) AddTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)

AddTagContext creates a tag.

func (*Sonarr) DeleteBlockList added in v1.0.0

func (s *Sonarr) DeleteBlockList(listID int64) error

DeleteBlockList removes a single block list item.

func (*Sonarr) DeleteBlockListContext added in v1.0.0

func (s *Sonarr) DeleteBlockListContext(ctx context.Context, listID int64) error

DeleteBlockListContext removes a single block list item with a context.

func (*Sonarr) DeleteBlockLists added in v1.0.0

func (s *Sonarr) DeleteBlockLists(ids []int64) error

DeleteBlockLists removes multiple block list items.

func (*Sonarr) DeleteBlockListsContext added in v1.0.0

func (s *Sonarr) DeleteBlockListsContext(ctx context.Context, ids []int64) error

DeleteBlockListsContext removes multiple block list items with a context.

func (*Sonarr) DeleteCustomFormat added in v1.0.0

func (s *Sonarr) DeleteCustomFormat(formatID int64) error

DeleteCustomFormat deletes a custom format. This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) DeleteCustomFormatContext added in v1.0.0

func (s *Sonarr) DeleteCustomFormatContext(ctx context.Context, formatID int64) error

DeleteCustomFormatContext deletes a custom format. This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) DeleteDelayProfile added in v1.0.0

func (s *Sonarr) DeleteDelayProfile(profileID int64) error

DeleteDelayProfile removes a single delay profile.

func (*Sonarr) DeleteDelayProfileContext added in v1.0.0

func (s *Sonarr) DeleteDelayProfileContext(ctx context.Context, profileID int64) error

DeleteDelayProfileContext removes a single delay profile.

func (*Sonarr) DeleteDownloadClient added in v1.0.0

func (s *Sonarr) DeleteDownloadClient(downloadclientID int64) error

DeleteDownloadClient removes a single download client.

func (*Sonarr) DeleteDownloadClientContext added in v1.0.0

func (s *Sonarr) DeleteDownloadClientContext(ctx context.Context, downloadclientID int64) error

DeleteDownloadClientContext removes a single download client.

func (*Sonarr) DeleteEpisodeFile added in v0.14.0

func (s *Sonarr) DeleteEpisodeFile(episodeFileID int64) error

DeleteEpisodeFile deletes an episode file.

func (*Sonarr) DeleteEpisodeFileContext added in v0.14.0

func (s *Sonarr) DeleteEpisodeFileContext(ctx context.Context, episodeFileID int64) error

DeleteEpisodeFileContext deletes an episode file, and takes a context.

func (*Sonarr) DeleteExclusions added in v1.0.0

func (s *Sonarr) DeleteExclusions(ids []int64) error

DeleteExclusions removes exclusions from Sonarr.

func (*Sonarr) DeleteExclusionsContext added in v1.0.0

func (s *Sonarr) DeleteExclusionsContext(ctx context.Context, ids []int64) error

DeleteExclusionsContext removes exclusions from Sonarr.

func (*Sonarr) DeleteImportList added in v1.0.0

func (s *Sonarr) DeleteImportList(importListID int64) error

DeleteImportList removes a single import list.

func (*Sonarr) DeleteImportListContext added in v1.0.0

func (s *Sonarr) DeleteImportListContext(ctx context.Context, importListID int64) error

DeleteImportListContext removes a single import list.

func (*Sonarr) DeleteIndexer added in v1.0.0

func (s *Sonarr) DeleteIndexer(indexerID int64) error

DeleteIndexer removes a single indexer.

func (*Sonarr) DeleteIndexerContext added in v1.0.0

func (s *Sonarr) DeleteIndexerContext(ctx context.Context, indexerID int64) error

DeleteIndexerContext removes a single indexer.

func (*Sonarr) DeleteLanguageProfile added in v1.0.0

func (s *Sonarr) DeleteLanguageProfile(profileID int64) error

DeleteLanguageProfile removes a single language profile.

func (*Sonarr) DeleteLanguageProfileContext added in v1.0.0

func (s *Sonarr) DeleteLanguageProfileContext(ctx context.Context, profileID int64) error

DeleteLanguageProfileContext removes a single language profile.

func (*Sonarr) DeleteNotification added in v1.0.0

func (s *Sonarr) DeleteNotification(notificationID int64) error

DeleteNotification removes a single notification.

func (*Sonarr) DeleteNotificationContext added in v1.0.0

func (s *Sonarr) DeleteNotificationContext(ctx context.Context, notificationID int64) error

func (*Sonarr) DeleteQualityProfile added in v1.0.0

func (s *Sonarr) DeleteQualityProfile(profileID int64) error

DeleteQualityProfile removes a single quality profile.

func (*Sonarr) DeleteQualityProfileContext added in v1.0.0

func (s *Sonarr) DeleteQualityProfileContext(ctx context.Context, profileID int64) error

DeleteQualityProfileContext removes a single quality profile.

func (*Sonarr) DeleteQueue added in v1.0.0

func (s *Sonarr) DeleteQueue(queueID int64, opts *starr.QueueDeleteOpts) error

DeleteQueue deletes an item from the Activity Queue.

func (*Sonarr) DeleteQueueContext added in v1.0.0

func (s *Sonarr) DeleteQueueContext(ctx context.Context, queueID int64, opts *starr.QueueDeleteOpts) error

DeleteQueueContext deletes an item from the Activity Queue.

func (*Sonarr) DeleteReleaseProfile added in v1.0.0

func (s *Sonarr) DeleteReleaseProfile(profileID int64) error

DeleteReleaseProfile removes a single release profile.

func (*Sonarr) DeleteReleaseProfileContext added in v1.0.0

func (s *Sonarr) DeleteReleaseProfileContext(ctx context.Context, profileID int64) error

DeleteReleaseProfileContext removes a single release profile.

func (*Sonarr) DeleteRemotePathMapping added in v1.0.0

func (s *Sonarr) DeleteRemotePathMapping(mappingID int64) error

DeleteRemotePathMapping removes a single remote path mapping.

func (*Sonarr) DeleteRemotePathMappingContext added in v1.0.0

func (s *Sonarr) DeleteRemotePathMappingContext(ctx context.Context, mappingID int64) error

DeleteRemotePathMappingContext removes a single remote path mapping.

func (*Sonarr) DeleteRootFolder added in v1.0.0

func (s *Sonarr) DeleteRootFolder(folderID int64) error

DeleteRootFolder removes a single root folder.

func (*Sonarr) DeleteRootFolderContext added in v1.0.0

func (s *Sonarr) DeleteRootFolderContext(ctx context.Context, folderID int64) error

DeleteRootFolderContext removes a single root folder.

func (*Sonarr) DeleteSeries added in v1.0.0

func (s *Sonarr) DeleteSeries(seriesID int, deleteFiles bool, importExclude bool) error

DeleteSeries removes a single Series. deleteFiles flag defines the deleteFiles query parameter. importExclude defines the addImportListExclusion query parameter.

func (*Sonarr) DeleteSeriesContext added in v1.0.0

func (s *Sonarr) DeleteSeriesContext(ctx context.Context, seriesID int, deleteFiles bool, importExclude bool) error

DeleteSeries removes a single Series. deleteFiles flag defines the deleteFiles query parameter. importExclude defines the addImportListExclusion query parameter.

func (*Sonarr) DeleteSeriesDefault added in v1.0.0

func (s *Sonarr) DeleteSeriesDefault(seriesID int) error

DeleteSeriesDefault defines the behaviour to set deleteFiles to true and addImportListExclusion to false.

func (*Sonarr) DeleteTag added in v0.14.0

func (s *Sonarr) DeleteTag(tagID int) error

DeleteTag removes a single tag.

func (*Sonarr) DeleteTagContext added in v0.14.0

func (s *Sonarr) DeleteTagContext(ctx context.Context, tagID int) error

DeleteTagContext removes a single tag.

func (*Sonarr) Fail added in v0.12.0

func (s *Sonarr) Fail(historyID int64) error

Fail marks the given history item as failed by id.

func (*Sonarr) FailContext added in v0.13.0

func (s *Sonarr) FailContext(ctx context.Context, historyID int64) error

FailContext marks the given history item as failed by id.

func (*Sonarr) GetAllSeries

func (s *Sonarr) GetAllSeries() ([]*Series, error)

GetAllSeries returns all configured series. This may not deal well with pagination atm, let us know?

func (*Sonarr) GetAllSeriesContext added in v0.13.0

func (s *Sonarr) GetAllSeriesContext(ctx context.Context) ([]*Series, error)

GetAllSeriesContext returns all configured series. This may not deal well with pagination atm, let us know?

func (*Sonarr) GetBackupFiles added in v0.12.0

func (s *Sonarr) GetBackupFiles() ([]*starr.BackupFile, error)

GetBackupFiles returns all available Sonarr backup files. Use Get to download a file using BackupFile.Path.

func (*Sonarr) GetBackupFilesContext added in v0.13.0

func (s *Sonarr) GetBackupFilesContext(ctx context.Context) ([]*starr.BackupFile, error)

GetBackupFilesContext returns all available Sonarr backup files. Use Get() to download a file using BackupFile.Path.

func (*Sonarr) GetBlockList added in v1.0.0

func (s *Sonarr) GetBlockList(count int) (*BlockList, error)

GetBlockList returns the count of block list items requested. If you need control over the page, use GetBlockListPage().

func (*Sonarr) GetBlockListContext added in v1.0.0

func (s *Sonarr) GetBlockListContext(ctx context.Context, records int) (*BlockList, error)

GetBlockListContext returns block list items.

func (*Sonarr) GetBlockListPage added in v1.0.0

func (s *Sonarr) GetBlockListPage(params *starr.PageReq) (*BlockList, error)

GetBlockListPage returns block list items based on filters.

func (*Sonarr) GetBlockListPageContext added in v1.0.0

func (s *Sonarr) GetBlockListPageContext(ctx context.Context, params *starr.PageReq) (*BlockList, error)

GetBlockListPageContext returns block list items based on filters.

func (*Sonarr) GetCalendar added in v1.0.0

func (s *Sonarr) GetCalendar(filter Calendar) ([]*Episode, error)

GetCalendar returns calendars based on filters.

func (*Sonarr) GetCalendarContext added in v1.0.0

func (s *Sonarr) GetCalendarContext(ctx context.Context, filter Calendar) ([]*Episode, error)

GetCalendarContext returns calendars based on filters.

func (*Sonarr) GetCalendarID added in v1.0.0

func (s *Sonarr) GetCalendarID(calendarID int64) (*Episode, error)

GetCalendarID returns a single calendar by ID.

func (*Sonarr) GetCalendarIDContext added in v1.0.0

func (s *Sonarr) GetCalendarIDContext(ctx context.Context, calendarID int64) (*Episode, error)

GetCalendarIDContext returns a single calendar by ID.

func (*Sonarr) GetCommandStatus added in v0.11.12

func (s *Sonarr) GetCommandStatus(commandID int64) (*CommandResponse, error)

GetCommandStatus returns the status of an already started command.

func (*Sonarr) GetCommandStatusContext added in v0.13.0

func (s *Sonarr) GetCommandStatusContext(ctx context.Context, commandID int64) (*CommandResponse, error)

GetCommandStatusContext returns the status of an already started command.

func (*Sonarr) GetCommands added in v0.9.10

func (s *Sonarr) GetCommands() ([]*CommandResponse, error)

GetCommands returns all available Sonarr commands. These can be used with SendCommand.

func (*Sonarr) GetCommandsContext added in v0.13.0

func (s *Sonarr) GetCommandsContext(ctx context.Context) ([]*CommandResponse, error)

GetCommands returns all available Sonarr commands. These can be used with SendCommand.

func (*Sonarr) GetCustomFormat added in v1.0.0

func (s *Sonarr) GetCustomFormat(customformatID int64) (*CustomFormatOutput, error)

GetCustomFormat returns a single customformat.

func (*Sonarr) GetCustomFormatContext added in v1.0.0

func (s *Sonarr) GetCustomFormatContext(ctx context.Context, customformatID int64) (*CustomFormatOutput, error)

GetCustomFormatContext returns a single customformat.

func (*Sonarr) GetCustomFormats added in v1.0.0

func (s *Sonarr) GetCustomFormats() ([]*CustomFormatOutput, error)

GetCustomFormats returns all configured Custom Formats. This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) GetCustomFormatsContext added in v1.0.0

func (s *Sonarr) GetCustomFormatsContext(ctx context.Context) ([]*CustomFormatOutput, error)

GetCustomFormatsContext returns all configured Custom Formats. This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) GetDelayProfile added in v1.0.0

func (s *Sonarr) GetDelayProfile(profileID int64) (*DelayProfile, error)

GetDelayProfile returns a single delay profile.

func (*Sonarr) GetDelayProfileContext added in v1.0.0

func (s *Sonarr) GetDelayProfileContext(ctx context.Context, profileID int64) (*DelayProfile, error)

GetDelayProfileContext returns a single delay profile.

func (*Sonarr) GetDelayProfiles added in v1.0.0

func (s *Sonarr) GetDelayProfiles() ([]*DelayProfile, error)

GetDelayProfiles returns all configured delay profiles.

func (*Sonarr) GetDelayProfilesContext added in v1.0.0

func (s *Sonarr) GetDelayProfilesContext(ctx context.Context) ([]*DelayProfile, error)

GetDelayProfilesContext returns all configured delay profiles.

func (*Sonarr) GetDownloadClient added in v1.0.0

func (s *Sonarr) GetDownloadClient(downloadclientID int64) (*DownloadClientOutput, error)

GetDownloadClient returns a single download client.

func (*Sonarr) GetDownloadClientConfig added in v1.0.0

func (s *Sonarr) GetDownloadClientConfig() (*DownloadClientConfig, error)

GetDownloadClientConfig returns the download client config.

func (*Sonarr) GetDownloadClientConfigContext added in v1.0.0

func (s *Sonarr) GetDownloadClientConfigContext(ctx context.Context) (*DownloadClientConfig, error)

GetDownloadClientConfig returns the download client config.

func (*Sonarr) GetDownloadClientContext added in v1.0.0

func (s *Sonarr) GetDownloadClientContext(ctx context.Context, downloadclientID int64) (*DownloadClientOutput, error)

GetDownloadClientContext returns a single download client.

func (*Sonarr) GetDownloadClients added in v1.0.0

func (s *Sonarr) GetDownloadClients() ([]*DownloadClientOutput, error)

GetDownloadClients returns all configured download clients.

func (*Sonarr) GetDownloadClientsContext added in v1.0.0

func (s *Sonarr) GetDownloadClientsContext(ctx context.Context) ([]*DownloadClientOutput, error)

GetDownloadClientsContext returns all configured download clients.

func (*Sonarr) GetEpisodeByID added in v1.0.0

func (s *Sonarr) GetEpisodeByID(episodeID int64) (*Episode, error)

GetEpisodeByID locates and returns an episode by DB [episode] ID.

func (*Sonarr) GetEpisodeByIDContext added in v1.0.0

func (s *Sonarr) GetEpisodeByIDContext(ctx context.Context, episodeID int64) (*Episode, error)

GetEpisodeByIDContext locates and returns an episode by DB [episode] ID.

func (*Sonarr) GetEpisodeFiles added in v0.14.0

func (s *Sonarr) GetEpisodeFiles(episodeFileIDs ...int64) ([]*EpisodeFile, error)

GetEpisodeFiles returns information about episode files by episode file IDs.

func (*Sonarr) GetEpisodeFilesContext added in v0.14.0

func (s *Sonarr) GetEpisodeFilesContext(ctx context.Context, episodeFileIDs ...int64) ([]*EpisodeFile, error)

GetEpisodeFilesContext returns information about episode files by episode file IDs.

func (*Sonarr) GetExclusions added in v1.0.0

func (s *Sonarr) GetExclusions() ([]*Exclusion, error)

GetExclusions returns all configured exclusions from Sonarr.

func (*Sonarr) GetExclusionsContext added in v1.0.0

func (s *Sonarr) GetExclusionsContext(ctx context.Context) ([]*Exclusion, error)

GetExclusionsContext returns all configured exclusions from Sonarr.

func (*Sonarr) GetHistory added in v0.10.6

func (s *Sonarr) GetHistory(records, perPage int) (*History, error)

GetHistory returns the Sonarr History (grabs/failures/completed). If you need control over the page, use sonarr.GetHistoryPage(). This function simply returns the number of history records desired, up to the number of records present in the application. It grabs records in (paginated) batches of perPage, and concatenates them into one list. Passing zero for records will return all of them.

func (*Sonarr) GetHistoryContext added in v0.13.0

func (s *Sonarr) GetHistoryContext(ctx context.Context, records, perPage int) (*History, error)

GetHistoryContext returns the Sonarr History (grabs/failures/completed). See GetHistory for more.

func (*Sonarr) GetHistoryPage added in v0.12.0

func (s *Sonarr) GetHistoryPage(params *starr.PageReq) (*History, error)

GetHistoryPage returns a single page from the Sonarr History (grabs/failures/completed). The page size and number is configurable with the input request parameters.

func (*Sonarr) GetHistoryPageContext added in v0.13.0

func (s *Sonarr) GetHistoryPageContext(ctx context.Context, params *starr.PageReq) (*History, error)

GetHistoryPageContext returns a single page from the Sonarr History (grabs/failures/completed). The page size and number is configurable with the input request parameters.

func (*Sonarr) GetImportList added in v1.0.0

func (s *Sonarr) GetImportList(importListID int64) (*ImportListOutput, error)

GetImportList returns a single import list.

func (*Sonarr) GetImportListContext added in v1.0.0

func (s *Sonarr) GetImportListContext(ctx context.Context, importListID int64) (*ImportListOutput, error)

GetIndGetImportListContextexer returns a single import list.

func (*Sonarr) GetImportLists added in v1.0.0

func (s *Sonarr) GetImportLists() ([]*ImportListOutput, error)

GetImportLists returns all configured import lists.

func (*Sonarr) GetImportListsContext added in v1.0.0

func (s *Sonarr) GetImportListsContext(ctx context.Context) ([]*ImportListOutput, error)

GetImportListsContext returns all configured import lists.

func (*Sonarr) GetIndexer added in v1.0.0

func (s *Sonarr) GetIndexer(indexerID int64) (*IndexerOutput, error)

GetIndexer returns a single indexer.

func (*Sonarr) GetIndexerConfig added in v1.0.0

func (s *Sonarr) GetIndexerConfig() (*IndexerConfig, error)

GetIndexerConfig returns an Indexer Config.

func (*Sonarr) GetIndexerConfigContext added in v1.0.0

func (s *Sonarr) GetIndexerConfigContext(ctx context.Context) (*IndexerConfig, error)

GetIndexerConfigContext returns the indexer Config.

func (*Sonarr) GetIndexerContext added in v1.0.0

func (s *Sonarr) GetIndexerContext(ctx context.Context, indexerID int64) (*IndexerOutput, error)

GetIndGetIndexerContextexer returns a single indexer.

func (*Sonarr) GetIndexers added in v1.0.0

func (s *Sonarr) GetIndexers() ([]*IndexerOutput, error)

GetIndexers returns all configured indexers.

func (*Sonarr) GetIndexersContext added in v1.0.0

func (s *Sonarr) GetIndexersContext(ctx context.Context) ([]*IndexerOutput, error)

GetIndexersContext returns all configured indexers.

func (*Sonarr) GetLanguageProfile added in v1.0.0

func (s *Sonarr) GetLanguageProfile(profileID int64) (*LanguageProfile, error)

GetLanguageProfile returns a single language profile.

func (*Sonarr) GetLanguageProfileContext added in v1.0.0

func (s *Sonarr) GetLanguageProfileContext(ctx context.Context, profileID int64) (*LanguageProfile, error)

GetLanguageProfileContext returns a single language profile.

func (*Sonarr) GetLanguageProfiles

func (s *Sonarr) GetLanguageProfiles() ([]*LanguageProfile, error)

GetLanguageProfiles returns all configured language profiles.

func (*Sonarr) GetLanguageProfilesContext added in v0.13.0

func (s *Sonarr) GetLanguageProfilesContext(ctx context.Context) ([]*LanguageProfile, error)

GetLanguageProfilesContext returns all configured language profiles.

func (*Sonarr) GetMediaManagement added in v1.0.0

func (s *Sonarr) GetMediaManagement() (*MediaManagement, error)

GetMediaManagement returns the mediaManagement.

func (*Sonarr) GetMediaManagementContext added in v1.0.0

func (s *Sonarr) GetMediaManagementContext(ctx context.Context) (*MediaManagement, error)

GetMediaManagement returns the Media Management.

func (*Sonarr) GetNaming added in v1.0.0

func (s *Sonarr) GetNaming() (*Naming, error)

GetNaming returns the naming.

func (*Sonarr) GetNamingContext added in v1.0.0

func (s *Sonarr) GetNamingContext(ctx context.Context) (*Naming, error)

GetNamingContext returns the naming.

func (*Sonarr) GetNotification added in v1.0.0

func (s *Sonarr) GetNotification(notificationID int) (*NotificationOutput, error)

GetNotification returns a single notification.

func (*Sonarr) GetNotificationContext added in v1.0.0

func (s *Sonarr) GetNotificationContext(ctx context.Context, notificationID int) (*NotificationOutput, error)

GetNotificationContext returns a single notification.

func (*Sonarr) GetNotifications added in v1.0.0

func (s *Sonarr) GetNotifications() ([]*NotificationOutput, error)

GetNotifications returns all configured notifications.

func (*Sonarr) GetNotificationsContext added in v1.0.0

func (s *Sonarr) GetNotificationsContext(ctx context.Context) ([]*NotificationOutput, error)

GetNotificationsContext returns all configured notifications.

func (*Sonarr) GetQualityDefinition added in v1.0.0

func (s *Sonarr) GetQualityDefinition(qualityDefinitionID int64) (*QualityDefinition, error)

GetQualityDefinition returns a single quality definition.

func (*Sonarr) GetQualityDefinitionContext added in v1.0.0

func (s *Sonarr) GetQualityDefinitionContext(ctx context.Context, qdID int64) (*QualityDefinition, error)

GetQualityDefinitionContext returns a single quality definition.

func (*Sonarr) GetQualityDefinitions added in v1.0.0

func (s *Sonarr) GetQualityDefinitions() ([]*QualityDefinition, error)

GetQualityDefinitions returns all configured quality definitions.

func (*Sonarr) GetQualityDefinitionsContext added in v1.0.0

func (s *Sonarr) GetQualityDefinitionsContext(ctx context.Context) ([]*QualityDefinition, error)

GetQualityDefinitionsContext returns all configured quality definitions.

func (*Sonarr) GetQualityProfile added in v1.0.0

func (s *Sonarr) GetQualityProfile(profileID int64) (*QualityProfile, error)

GetQualityProfile returns a single quality profile.

func (*Sonarr) GetQualityProfileContext added in v1.0.0

func (s *Sonarr) GetQualityProfileContext(ctx context.Context, profileID int64) (*QualityProfile, error)

GetQualityProfileContext returns a single quality profile.

func (*Sonarr) GetQualityProfiles

func (s *Sonarr) GetQualityProfiles() ([]*QualityProfile, error)

GetQualityProfiles returns all configured quality profiles.

func (*Sonarr) GetQualityProfilesContext added in v0.13.0

func (s *Sonarr) GetQualityProfilesContext(ctx context.Context) ([]*QualityProfile, error)

GetQualityProfilesContext returns all configured quality profiles.

func (*Sonarr) GetQueue added in v0.10.0

func (s *Sonarr) GetQueue(records, perPage int) (*Queue, error)

GetQueue returns a single page from the Sonarr Queue (processing, but not yet imported). If you need control over the page, use sonarr.GetQueuePage(). This function simply returns the number of queue records desired, up to the number of records present in the application. It grabs records in (paginated) batches of perPage, and concatenates them into one list. Passing zero for records will return all of them.

func (*Sonarr) GetQueueContext added in v0.13.0

func (s *Sonarr) GetQueueContext(ctx context.Context, records, perPage int) (*Queue, error)

GetQueue returns a single page from the Sonarr Queue (processing, but not yet imported). If you need control over the page, use sonarr.GetQueuePageContext().

func (*Sonarr) GetQueuePage added in v0.12.0

func (s *Sonarr) GetQueuePage(params *starr.PageReq) (*Queue, error)

GetQueuePage returns a single page from the Sonarr Queue. The page size and number is configurable with the input request parameters.

func (*Sonarr) GetQueuePageContext added in v0.13.0

func (s *Sonarr) GetQueuePageContext(ctx context.Context, params *starr.PageReq) (*Queue, error)

GetQueuePageContext returns a single page from the Sonarr Queue. The page size and number is configurable with the input request parameters.

func (*Sonarr) GetReleaseProfile added in v1.0.0

func (s *Sonarr) GetReleaseProfile(profileID int64) (*ReleaseProfile, error)

GetReleaseProfile returns a single release profile.

func (*Sonarr) GetReleaseProfileContext added in v1.0.0

func (s *Sonarr) GetReleaseProfileContext(ctx context.Context, profileID int64) (*ReleaseProfile, error)

GetReleaseProfileContext returns a single release profile.

func (*Sonarr) GetReleaseProfiles added in v0.9.11

func (s *Sonarr) GetReleaseProfiles() ([]*ReleaseProfile, error)

GetReleaseProfiles returns all configured release profiles.

func (*Sonarr) GetReleaseProfilesContext added in v0.13.0

func (s *Sonarr) GetReleaseProfilesContext(ctx context.Context) ([]*ReleaseProfile, error)

GetReleaseProfilesContext returns all configured release profiles.

func (*Sonarr) GetRemotePathMapping added in v1.0.0

func (s *Sonarr) GetRemotePathMapping(mappingID int64) (*starr.RemotePathMapping, error)

GetRemotePathMapping returns a single remote path mapping.

func (*Sonarr) GetRemotePathMappingContext added in v1.0.0

func (s *Sonarr) GetRemotePathMappingContext(ctx context.Context, mappingID int64) (*starr.RemotePathMapping, error)

GetRemotePathMappingContext returns a single remote path mapping.

func (*Sonarr) GetRemotePathMappings added in v1.0.0

func (s *Sonarr) GetRemotePathMappings() ([]*starr.RemotePathMapping, error)

GetRemotePathMappings returns all configured remote path mappings.

func (*Sonarr) GetRemotePathMappingsContext added in v1.0.0

func (s *Sonarr) GetRemotePathMappingsContext(ctx context.Context) ([]*starr.RemotePathMapping, error)

GetRemotePathMappingsContext returns all configured remote path mappings.

func (*Sonarr) GetRootFolder added in v1.0.0

func (s *Sonarr) GetRootFolder(folderID int64) (*RootFolder, error)

GetRootFolder returns a single root folder.

func (*Sonarr) GetRootFolderContext added in v1.0.0

func (s *Sonarr) GetRootFolderContext(ctx context.Context, folderID int64) (*RootFolder, error)

GetRootFolderContext returns a single root folder.

func (*Sonarr) GetRootFolders

func (s *Sonarr) GetRootFolders() ([]*RootFolder, error)

GetRootFolders returns all configured root folders.

func (*Sonarr) GetRootFoldersContext added in v0.13.0

func (s *Sonarr) GetRootFoldersContext(ctx context.Context) ([]*RootFolder, error)

GetRootFoldersContext returns all configured root folders.

func (*Sonarr) GetSeries

func (s *Sonarr) GetSeries(tvdbID int64) ([]*Series, error)

GetSeries locates and returns a series by tvdbID. If tvdbID is 0, returns all series.

func (*Sonarr) GetSeriesByID

func (s *Sonarr) GetSeriesByID(seriesID int64) (*Series, error)

GetSeriesByID locates and returns a series by DB [series] ID.

func (*Sonarr) GetSeriesByIDContext added in v0.13.0

func (s *Sonarr) GetSeriesByIDContext(ctx context.Context, seriesID int64) (*Series, error)

GetSeriesByIDContext locates and returns a series by DB [series] ID.

func (*Sonarr) GetSeriesContext added in v0.13.0

func (s *Sonarr) GetSeriesContext(ctx context.Context, tvdbID int64) ([]*Series, error)

GetSeriesContext locates and returns a series by tvdbID. If tvdbID is 0, returns all series.

func (*Sonarr) GetSeriesEpisodeFiles added in v0.14.0

func (s *Sonarr) GetSeriesEpisodeFiles(seriesID int64) ([]*EpisodeFile, error)

GetSeriesEpisodeFile returns information about all episode files in a series.

func (*Sonarr) GetSeriesEpisodeFilesContext added in v0.14.0

func (s *Sonarr) GetSeriesEpisodeFilesContext(ctx context.Context, seriesID int64) ([]*EpisodeFile, error)

GetSeriesEpisodeFilesContext returns information about episode files by episode file ID.

func (*Sonarr) GetSeriesEpisodes added in v0.10.2

func (s *Sonarr) GetSeriesEpisodes(seriesID int64) ([]*Episode, error)

GetSeriesEpisodes returns all episodes for a series by series ID. You can get series IDs from GetAllSeries() and GetSeries().

func (*Sonarr) GetSeriesEpisodesContext added in v0.13.0

func (s *Sonarr) GetSeriesEpisodesContext(ctx context.Context, seriesID int64) ([]*Episode, error)

GetSeriesEpisodesContext returns all episodes for a series by series ID. You can get series IDs from GetAllSeries() and GetSeries().

func (*Sonarr) GetSeriesLookup

func (s *Sonarr) GetSeriesLookup(term string, tvdbID int64) ([]*Series, error)

GetSeriesLookup searches for a series [in Servarr] using a search term or a tvdbid. Provide a search term or a tvdbid. If you provide both, tvdbID is used.

func (*Sonarr) GetSeriesLookupContext added in v0.13.0

func (s *Sonarr) GetSeriesLookupContext(ctx context.Context, term string, tvdbID int64) ([]*Series, error)

GetSeriesLookupContext searches for a series [in Servarr] using a search term or a tvdbid. Provide a search term or a tvdbid. If you provide both, tvdbID is used.

func (*Sonarr) GetSystemStatus

func (s *Sonarr) GetSystemStatus() (*SystemStatus, error)

GetSystemStatus returns system status.

func (*Sonarr) GetSystemStatusContext added in v0.13.0

func (s *Sonarr) GetSystemStatusContext(ctx context.Context) (*SystemStatus, error)

GetSystemStatusContext returns system status.

func (*Sonarr) GetTag added in v0.14.0

func (s *Sonarr) GetTag(tagID int) (*starr.Tag, error)

GetTag returns a single tag.

func (*Sonarr) GetTagContext added in v0.14.0

func (s *Sonarr) GetTagContext(ctx context.Context, tagID int) (*starr.Tag, error)

GetTagContext returns a single tag.

func (*Sonarr) GetTags

func (s *Sonarr) GetTags() ([]*starr.Tag, error)

GetTags returns all configured tags.

func (*Sonarr) GetTagsContext added in v0.13.0

func (s *Sonarr) GetTagsContext(ctx context.Context) ([]*starr.Tag, error)

GetTagsContext returns all configured tags.

func (*Sonarr) Lookup added in v0.12.0

func (s *Sonarr) Lookup(term string) ([]*Series, error)

Lookup will search for series matching the specified search term. Searches for new shows on TheTVDB.com utilizing sonarr.tv's caching and augmentation proxy.

func (*Sonarr) LookupContext added in v0.13.0

func (s *Sonarr) LookupContext(ctx context.Context, term string) ([]*Series, error)

Lookup will search for series matching the specified search term. Searches for new shows on TheTVDB.com utilizing sonarr.tv's caching and augmentation proxy.

func (*Sonarr) ManualImport added in v1.0.0

func (s *Sonarr) ManualImport(params *ManualImportParams) (*ManualImportOutput, error)

ManualImport initiates a manual import (GET).

func (*Sonarr) ManualImportContext added in v1.0.0

func (s *Sonarr) ManualImportContext(ctx context.Context, params *ManualImportParams) (*ManualImportOutput, error)

ManualImportContext initiates a manual import (GET).

func (*Sonarr) ManualImportReprocess added in v1.0.0

func (s *Sonarr) ManualImportReprocess(manualimport *ManualImportInput) error

ManualImportReprocess reprocesses a manual import (POST).

func (*Sonarr) ManualImportReprocessContext added in v1.0.0

func (s *Sonarr) ManualImportReprocessContext(ctx context.Context, manualimport *ManualImportInput) error

ManualImportReprocessContext reprocesses a manual import (POST).

func (*Sonarr) MonitorEpisode added in v0.10.2

func (s *Sonarr) MonitorEpisode(episodeIDs []int64, monitor bool) ([]*Episode, error)

MonitorEpisode sends a request to monitor (true) or unmonitor (false) a list of episodes by ID. You can get episode IDs from GetSeriesEpisodes().

func (*Sonarr) MonitorEpisodeContext added in v0.13.0

func (s *Sonarr) MonitorEpisodeContext(ctx context.Context, episodeIDs []int64, monitor bool) ([]*Episode, error)

MonitorEpisodeContext sends a request to monitor (true) or unmonitor (false) a list of episodes by ID. You can get episode IDs from GetSeriesEpisodes().

func (*Sonarr) QueueGrab added in v1.0.0

func (s *Sonarr) QueueGrab(ids ...int64) error

QueueGrab tells the app to grab an item that's in queue. Most often used on items with a delay set from a delay profile.

func (*Sonarr) QueueGrabContext added in v1.0.0

func (s *Sonarr) QueueGrabContext(ctx context.Context, ids ...int64) error

QueueGrabContext tells the app to grab an item that's in queue, probably set to a delay. Most often used on items with a delay set from a delay profile.

func (*Sonarr) SendCommand added in v0.9.10

func (s *Sonarr) SendCommand(cmd *CommandRequest) (*CommandResponse, error)

SendCommand sends a command to Sonarr.

func (*Sonarr) SendCommandContext added in v0.13.0

func (s *Sonarr) SendCommandContext(ctx context.Context, cmd *CommandRequest) (*CommandResponse, error)

SendCommandContext sends a command to Sonarr.

func (*Sonarr) TestDownloadClient added in v1.0.0

func (s *Sonarr) TestDownloadClient(client *DownloadClientInput) error

TestDownloadClient tests a download client.

func (*Sonarr) TestDownloadClientContext added in v1.0.0

func (s *Sonarr) TestDownloadClientContext(ctx context.Context, client *DownloadClientInput) error

TestDownloadClientContext tests a download client.

func (*Sonarr) TestImportList added in v1.0.0

func (s *Sonarr) TestImportList(list *ImportListInput) error

TestImportList tests an import list.

func (*Sonarr) TestImportListContextt added in v1.0.0

func (s *Sonarr) TestImportListContextt(ctx context.Context, list *ImportListInput) error

TestImportListContextt tests an import list.

func (*Sonarr) TestIndexer added in v1.0.0

func (s *Sonarr) TestIndexer(indexer *IndexerInput) error

TestIndexer tests an indexer.

func (*Sonarr) TestIndexerContext added in v1.0.0

func (s *Sonarr) TestIndexerContext(ctx context.Context, indexer *IndexerInput) error

TestIndexerContext tests an indexer.

func (*Sonarr) UpdateCustomFormat added in v1.0.0

func (s *Sonarr) UpdateCustomFormat(format *CustomFormatInput) (*CustomFormatOutput, error)

UpdateCustomFormat updates an existing custom format and returns the response. This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) UpdateCustomFormatContext added in v1.0.0

func (s *Sonarr) UpdateCustomFormatContext(
	ctx context.Context,
	format *CustomFormatInput,
) (*CustomFormatOutput, error)

UpdateCustomFormatContext updates an existing custom format and returns the response. This data and these endpoints do not exist in Sonarr v3; this is v4 only.

func (*Sonarr) UpdateDelayProfile added in v1.0.0

func (s *Sonarr) UpdateDelayProfile(profile *DelayProfile) (*DelayProfile, error)

UpdateDelayProfile updates the delay profile.

func (*Sonarr) UpdateDelayProfileContext added in v1.0.0

func (s *Sonarr) UpdateDelayProfileContext(ctx context.Context, profile *DelayProfile) (*DelayProfile, error)

UpdateDelayProfileContext updates the delay profile.

func (*Sonarr) UpdateDownloadClient added in v1.0.0

func (s *Sonarr) UpdateDownloadClient(downloadclient *DownloadClientInput, force bool) (*DownloadClientOutput, error)

UpdateDownloadClient updates the download client.

func (*Sonarr) UpdateDownloadClientConfig added in v1.0.0

func (s *Sonarr) UpdateDownloadClientConfig(downloadClientConfig *DownloadClientConfig) (*DownloadClientConfig, error)

UpdateDownloadClientConfig update the single download client config.

func (*Sonarr) UpdateDownloadClientConfigContext added in v1.0.0

func (s *Sonarr) UpdateDownloadClientConfigContext(ctx context.Context,
	config *DownloadClientConfig,
) (*DownloadClientConfig, error)

UpdateDownloadClientConfig update the single download client config.

func (*Sonarr) UpdateDownloadClientContext added in v1.0.0

func (s *Sonarr) UpdateDownloadClientContext(ctx context.Context,
	client *DownloadClientInput,
	force bool,
) (*DownloadClientOutput, error)

UpdateDownloadClientContext updates the download client.

func (*Sonarr) UpdateEpisodeFileQuality added in v0.14.0

func (s *Sonarr) UpdateEpisodeFileQuality(episodeFileID, qualityID int64) (*EpisodeFile, error)

UpdateEpisodeFile updates an episode file's quality. Use GetQualityProfiles() to find the available IDs.

func (*Sonarr) UpdateEpisodeFileQualityContext added in v0.14.0

func (s *Sonarr) UpdateEpisodeFileQualityContext(
	ctx context.Context,
	episodeFileID int64,
	qualityID int64,
) (*EpisodeFile, error)

UpdateEpisodeFileQualityContext updates an episode file, and takes a context.

func (*Sonarr) UpdateExclusion added in v1.0.0

func (s *Sonarr) UpdateExclusion(exclusion *Exclusion) (*Exclusion, error)

UpdateExclusion changes an exclusions in Sonarr.

func (*Sonarr) UpdateExclusionContext added in v1.0.0

func (s *Sonarr) UpdateExclusionContext(ctx context.Context, exclusion *Exclusion) (*Exclusion, error)

UpdateExclusionContext changes an exclusions in Sonarr.

func (*Sonarr) UpdateImportList added in v1.0.0

func (s *Sonarr) UpdateImportList(importList *ImportListInput, force bool) (*ImportListOutput, error)

UpdateImportList updates the import list.

func (*Sonarr) UpdateImportListContext added in v1.0.0

func (s *Sonarr) UpdateImportListContext(
	ctx context.Context,
	importList *ImportListInput,
	force bool,
) (*ImportListOutput, error)

UpdateImportListContext updates the import list.

func (*Sonarr) UpdateIndexer added in v1.0.0

func (s *Sonarr) UpdateIndexer(indexer *IndexerInput, force bool) (*IndexerOutput, error)

UpdateIndexer updates the indexer.

func (*Sonarr) UpdateIndexerConfig added in v1.0.0

func (s *Sonarr) UpdateIndexerConfig(indexerConfig *IndexerConfig) (*IndexerConfig, error)

UpdateIndexerConfig update the single indexerConfig.

func (*Sonarr) UpdateIndexerConfigContext added in v1.0.0

func (s *Sonarr) UpdateIndexerConfigContext(ctx context.Context, indexerConfig *IndexerConfig) (*IndexerConfig, error)

UpdateIndexerConfigContext update the single indexerConfig.

func (*Sonarr) UpdateIndexerContext added in v1.0.0

func (s *Sonarr) UpdateIndexerContext(
	ctx context.Context,
	indexer *IndexerInput,
	force bool,
) (*IndexerOutput, error)

UpdateIndexerContext updates the indexer.

func (*Sonarr) UpdateLanguageProfile added in v1.0.0

func (s *Sonarr) UpdateLanguageProfile(profile *LanguageProfile) (*LanguageProfile, error)

UpdateLanguageProfile updates the language profile.

func (*Sonarr) UpdateLanguageProfileContext added in v1.0.0

func (s *Sonarr) UpdateLanguageProfileContext(ctx context.Context, profile *LanguageProfile) (*LanguageProfile, error)

UpdateLanguageProfileContext updates the language profile.

func (*Sonarr) UpdateMediaManagement added in v1.0.0

func (s *Sonarr) UpdateMediaManagement(mMgt *MediaManagement) (*MediaManagement, error)

UpdateMediaManagement updates the Media Management.

func (*Sonarr) UpdateMediaManagementContext added in v1.0.0

func (s *Sonarr) UpdateMediaManagementContext(ctx context.Context, mMgt *MediaManagement) (*MediaManagement, error)

UpdateMediaManagementContext updates the Media Management.

func (*Sonarr) UpdateNaming added in v1.0.0

func (s *Sonarr) UpdateNaming(naming *Naming) (*Naming, error)

UpdateNaming updates the naming.

func (*Sonarr) UpdateNamingContext added in v1.0.0

func (s *Sonarr) UpdateNamingContext(ctx context.Context, naming *Naming) (*Naming, error)

UpdateNamingContext updates the naming.

func (*Sonarr) UpdateNotification added in v1.0.0

func (s *Sonarr) UpdateNotification(notification *NotificationInput) (*NotificationOutput, error)

UpdateNotification updates the notification.

func (*Sonarr) UpdateNotificationContext added in v1.0.0

func (s *Sonarr) UpdateNotificationContext(ctx context.Context,
	client *NotificationInput,
) (*NotificationOutput, error)

UpdateNotificationContext updates the notification.

func (*Sonarr) UpdateQualityDefinition added in v1.0.0

func (s *Sonarr) UpdateQualityDefinition(definition *QualityDefinition) (*QualityDefinition, error)

UpdateQualityDefinition updates a quality definition.

func (*Sonarr) UpdateQualityDefinitionContext added in v1.0.0

func (s *Sonarr) UpdateQualityDefinitionContext(
	ctx context.Context,
	definition *QualityDefinition,
) (*QualityDefinition, error)

UpdateQualityDefinitionContext updates a quality definition.

func (*Sonarr) UpdateQualityDefinitions added in v1.0.0

func (s *Sonarr) UpdateQualityDefinitions(definitions []*QualityDefinition) ([]*QualityDefinition, error)

UpdateQualityDefinition updates all quality definitions.

func (*Sonarr) UpdateQualityDefinitionsContext added in v1.0.0

func (s *Sonarr) UpdateQualityDefinitionsContext(
	ctx context.Context,
	definitions []*QualityDefinition,
) ([]*QualityDefinition, error)

UpdateQualityDefinitionsContext updates all quality definitions.

func (*Sonarr) UpdateQualityProfile added in v0.9.11

func (s *Sonarr) UpdateQualityProfile(profile *QualityProfile) (*QualityProfile, error)

UpdateQualityProfile updates the quality profile.

func (*Sonarr) UpdateQualityProfileContext added in v0.13.0

func (s *Sonarr) UpdateQualityProfileContext(ctx context.Context, profile *QualityProfile) (*QualityProfile, error)

UpdateQualityProfileContext updates the quality profile.

func (*Sonarr) UpdateReleaseProfile added in v0.9.11

func (s *Sonarr) UpdateReleaseProfile(profile *ReleaseProfile) (*ReleaseProfile, error)

UpdateReleaseProfile updates the release profile.

func (*Sonarr) UpdateReleaseProfileContext added in v0.13.0

func (s *Sonarr) UpdateReleaseProfileContext(ctx context.Context, profile *ReleaseProfile) (*ReleaseProfile, error)

UpdateReleaseProfileContext updates the release profile.

func (*Sonarr) UpdateRemotePathMapping added in v1.0.0

func (s *Sonarr) UpdateRemotePathMapping(mapping *starr.RemotePathMapping) (*starr.RemotePathMapping, error)

UpdateRemotePathMapping updates the remote path mapping.

func (*Sonarr) UpdateRemotePathMappingContext added in v1.0.0

func (s *Sonarr) UpdateRemotePathMappingContext(ctx context.Context,
	mapping *starr.RemotePathMapping,
) (*starr.RemotePathMapping, error)

UpdateRemotePathMappingContext updates the remote path mapping.

func (*Sonarr) UpdateSeasonPass added in v0.14.0

func (s *Sonarr) UpdateSeasonPass(seasonPass *SeasonPass) error

UpdateSeasonPass allows monitoring many Series and episodes at once.

func (*Sonarr) UpdateSeasonPassContext added in v0.14.0

func (s *Sonarr) UpdateSeasonPassContext(ctx context.Context, seasonPass *SeasonPass) error

UpdateSeasonPassContext allows monitoring many series and episodes at once.

func (*Sonarr) UpdateSeries

func (s *Sonarr) UpdateSeries(series *AddSeriesInput, moveFiles bool) (*Series, error)

UpdateSeries updates a series in place.

func (*Sonarr) UpdateSeriesContext added in v0.13.0

func (s *Sonarr) UpdateSeriesContext(ctx context.Context, series *AddSeriesInput, moveFiles bool) (*Series, error)

UpdateSeriesContext updates a series in place.

func (*Sonarr) UpdateTag

func (s *Sonarr) UpdateTag(tag *starr.Tag) (*starr.Tag, error)

UpdateTag updates the tag.

func (*Sonarr) UpdateTagContext added in v0.13.0

func (s *Sonarr) UpdateTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)

UpdateTagContext updates the tag.

type Statistics

type Statistics struct {
	SeasonCount       int       `json:"seasonCount"`
	EpisodeFileCount  int       `json:"episodeFileCount"`
	EpisodeCount      int       `json:"episodeCount"`
	TotalEpisodeCount int       `json:"totalEpisodeCount"`
	SizeOnDisk        int64     `json:"sizeOnDisk"`
	PercentOfEpisodes float64   `json:"percentOfEpisodes"`
	PreviousAiring    time.Time `json:"previousAiring"`
}

Statistics is part of AddSeriesInput and Queue.

type SystemStatus

type SystemStatus struct {
	AppData                string    `json:"appData"`
	AppName                string    `json:"appName"`
	Authentication         string    `json:"authentication"`
	Branch                 string    `json:"branch"`
	BuildTime              time.Time `json:"buildTime"`
	InstanceName           string    `json:"instanceName"`
	IsAdmin                bool      `json:"isAdmin"`
	IsDebug                bool      `json:"isDebug"`
	IsLinux                bool      `json:"isLinux"`
	IsMono                 bool      `json:"isMono"`
	IsMonoRuntime          bool      `json:"isMonoRuntime"`
	IsOsx                  bool      `json:"isOsx"`
	IsProduction           bool      `json:"isProduction"`
	IsUserInteractive      bool      `json:"isUserInteractive"`
	IsWindows              bool      `json:"isWindows"`
	Mode                   string    `json:"mode"`
	OsName                 string    `json:"osName"`
	OsVersion              string    `json:"osVersion"`
	PackageAuthor          string    `json:"packageAuthor"`
	PackageUpdateMechanism string    `json:"packageUpdateMechanism"`
	PackageVersion         string    `json:"packageVersion"`
	RuntimeName            string    `json:"runtimeName"`
	RuntimeVersion         string    `json:"runtimeVersion"`
	SqliteVersion          string    `json:"sqliteVersion"`
	StartTime              time.Time `json:"startTime"`
	StartupPath            string    `json:"startupPath"`
	URLBase                string    `json:"urlBase"`
	Version                string    `json:"version"`
}

SystemStatus is the /api/v3/system/status endpoint.

Jump to

Keyboard shortcuts

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