sonarr

package
v0.0.0-...-04bcfef Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSeriesOptions

type AddSeriesOptions struct {
	TVDBID            int    `json:"tvdbid"`
	Title             string `json:"title"`
	ProfileID         int    `json:"profileId"`
	LanguageProfileID int    `json:"languageProfileId"`
	Seasons           []int  `json:"seasons"`
	SeasonFolder      bool   `json:"seasonFolder"`
	RootFolderPath    string `json:"rootFolderPath"`
	Tags              []int  `json:"tags"`
	Monitored         bool   `json:"monitored"`
	SearchNow         bool   `json:"searchNow"`
}

type AddTVShowOptions

type AddTVShowOptions struct {
	SearchForMissingEpisodes   bool `json:"searchForMissingEpisodes"`
	IgnoreEpisodesWithFiles    bool `json:"ignoreEpisodesWithFiles"`
	IgnoreEpisodesWithoutFiles bool `json:"ignoreEpisodesWithoutFiles"`
}

type AddTVShowRequest

type AddTVShowRequest struct {
	ID                int              `json:"ID"`
	Title             string           `json:"title"`
	TitleSlug         string           `json:"titleSlug"`
	Images            []TVShowImage    `json:"images"`
	QualityProfileID  int              `json:"qualityProfileId"`
	LanguageProfileID int              `json:"languageProfileId"`
	TVDBID            int              `json:"tvdbId"`
	RootFolderPath    string           `json:"rootFolderPath"`
	Monitored         bool             `json:"monitored"`
	SeasonFolder      bool             `json:"seasonFolder"`
	Tags              []int            `json:"tags,omitempty"`
	AddOptions        AddTVShowOptions `json:"addOptions"`
	Year              int              `json:"year"`
	Seasons           []*TVShowSeason  `json:"seasons"`
	Path              string           `json:path,omitempty`
}

type AlternateTitles

type AlternateTitles struct {
	Title        string `json:"title,omitempty"`
	SeasonNumber int    `json:"seasonNumber,omitempty"`
}

type Client

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

func NewClient

func NewClient(c Config) (*Client, error)

func (*Client) AddRequester

func (c *Client) AddRequester(t TVShow, requester string) (TVShow, error)

func (*Client) AddTVShow

func (c *Client) AddTVShow(show TVShow, options AddSeriesOptions) (*TVShow, error)

func (*Client) CreateTag

func (c *Client) CreateTag(label string) (tag TVShowTag, err error)

func (*Client) DeleteTVShow

func (c *Client) DeleteTVShow(tvShowId int) (err error)

func (*Client) GetFolders

func (c *Client) GetFolders() ([]Folder, error)

func (*Client) GetMonitoredTVShows

func (c *Client) GetMonitoredTVShows() (tvShows []TVShow, err error)

func (*Client) GetPosterURL

func (c *Client) GetPosterURL(tvShow TVShow) string

func (*Client) GetProfile

func (c *Client) GetProfile(prfl string) ([]Profile, error)

func (*Client) GetRequesterList

func (c *Client) GetRequesterList(tvShow TVShow) (requester []string)

func (*Client) GetSystemStatus

func (c *Client) GetSystemStatus() (SystemStatus, error)

func (*Client) GetTVShow

func (c *Client) GetTVShow(tvShowId int) (tvShow TVShow, err error)

func (*Client) GetTVShows

func (c *Client) GetTVShows() (tvShows []TVShow, err error)

func (*Client) GetTVShowsByFolder

func (c *Client) GetTVShowsByFolder(folder Folder) (tvShows []TVShow, err error)

func (*Client) GetTVShowsByRequester

func (c *Client) GetTVShowsByRequester(requester string) (tvShows []TVShow, err error)

func (*Client) GetTagById

func (c *Client) GetTagById(id int) (tvShowTag TVShowTag, err error)

func (*Client) GetTagByLabel

func (c *Client) GetTagByLabel(label string, createNew bool) (tvShowTag TVShowTag, err error)

func (*Client) GetTags

func (c *Client) GetTags() (tags []TVShowTag, err error)

func (*Client) RemoveRequester

func (c *Client) RemoveRequester(t TVShow, requester string) (TVShow, error)

func (*Client) SearchTVShow

func (c *Client) SearchTVShow(tvdbId int) (show TVShow, err error)

func (*Client) SearchTVShows

func (c *Client) SearchTVShows(term string) ([]TVShow, error)

func (*Client) UpdateTVShow

func (c *Client) UpdateTVShow(t TVShow) (tvShow TVShow, err error)

type CommandRequest

type CommandRequest struct {
	Name         string `json:"name"`
	SeasonNumber int    `json:"seasonNumber,omitempty"`
	SeriesID     int    `json:"seriesId"`
}

type Config

type Config struct {
	Hostname          string `json:"hostname"`
	APIKey            string `json:"apiKey"`
	Port              int    `json:"port"`
	URLBase           string `json:"urlBase"`
	SSL               bool   `json:"ssl"`
	Username          string `json:"username"`
	Password          string `json:"password"`
	MaxResults        int    `json:"maxResults"`
	QualityID         int    `json:"qualityId"`
	LanguageProfileID int    `json:"languageProfileId"`
}

type Folder

type Folder struct {
	Path      string `json:"path"`
	FreeSpace int64  `json:"freeSpace"`
	ID        int    `json:"id"`
}

type Profile

type Profile struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
}

type SeasonStatistics

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

type SystemStatus

type SystemStatus struct {
	Version           string `json:"version"`
	BuildTime         string `json:"buildTime"`
	IsDebug           bool   `json:"isDebug"`
	IsProduction      bool   `json:"isProduction"`
	IsAdmin           bool   `json:"isAdmin"`
	IsUserInteractive bool   `json:"isUserInteractive"`
	StartupPath       string `json:"startupPath"`
	AppData           string `json:"appData"`
	OsName            string `json:"osName"`
	OsVersion         string `json:"osVersion"`
	IsMonoRuntime     bool   `json:"isMonoRuntime"`
	IsMono            bool   `json:"isMono"`
	IsLinux           bool   `json:"isLinux"`
	IsOsx             bool   `json:"isOsx"`
	IsWindows         bool   `json:"isWindows"`
	Branch            string `json:"branch"`
	Authentication    string `json:"authentication"`
	SqliteVersion     string `json:"sqliteVersion"`
	UrlBase           string `json:"urlBase"`
	RuntimeVersion    string `json:"runtimeVersion"`
	RuntimeName       string `json:"runtimeName"`
}

type TVShow

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

func (TVShow) String

func (m TVShow) String() string

type TVShowImage

type TVShowImage struct {
	CoverType string `json:"coverType"`
	URL       string `json:"url"`
	RemoteURL string `json:"remoteUrl,omitempty"`
}

type TVShowRatings

type TVShowRatings struct {
	Value float64 `json:"value,omitempty"`
	Votes int     `json:"votes,omitempty"`
}

type TVShowSeason

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

type TVShowStatistics

type TVShowStatistics struct {
	SeasonCount       int     `json:"seasonCount,omitempty"`
	EpisodeFileCount  int     `json:"episodeFileCount,omitempty"`
	EpisodeCount      int     `json:"episodeCount,omitempty"`
	TotalEpisodeCount int     `json:"totalEpisodeCount,omitempty"`
	SizeOnDisk        int64   `json:"sizeOnDisk,omitempty"`
	PercentOfEpisodes float64 `json:"percentOfEpisodes,omitempty"`
}

type TVShowTag

type TVShowTag struct {
	Id    int    `json:"id,omitempty"`
	Label string `json:"label,omitempty"`
}

Jump to

Keyboard shortcuts

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