internal

package
v0.0.0-...-50a2f59 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Episode

type Episode struct {
	Id            int  `json:"id"`
	FileId        int  `json:"episodeFileId"`
	SeasonNumber  int  `json:"seasonNumber"`
	EpisodeNumber int  `json:"episodeNumber"`
	HasFile       bool `json:"hasFile"`
	Monitored     bool `json:"monitored"`
	Serie         *Serie
	File          *EpisodeFile
}

func (Episode) Expired

func (episode Episode) Expired(maxDays int) bool

type EpisodeFile

type EpisodeFile struct {
	Id        int        `json:"id"`
	Size      int        `json:"size"`
	DateAdded *time.Time `json:"dateAdded"`
}

type EpisodeList

type EpisodeList []Episode

func (EpisodeList) ByFileDate

func (episodes EpisodeList) ByFileDate() EpisodeList

func (EpisodeList) MonitorUpdate

func (episodes EpisodeList) MonitorUpdate(monitored bool) MonitorUpdate

func (EpisodeList) Size

func (episodes EpisodeList) Size() int

func (EpisodeList) WithFile

func (episodes EpisodeList) WithFile() EpisodeList

type IServarr

type IServarr interface {
	Tick(*sync.WaitGroup)
}

type MonitorUpdate

type MonitorUpdate struct {
	Monitored  bool  `json:"monitored"`
	EpisodeIds []int `json:"episodeIds"`
}

type Movie

type Movie struct {
	Id    int        `json:"id"`
	Title string     `json:"title"`
	Added *time.Time `json:"added"`
	File  *MovieFile `json:"movieFile"`
}

func (Movie) Expired

func (m Movie) Expired(maxDays int) bool

func (Movie) HasFile

func (m Movie) HasFile() bool

type MovieFile

type MovieFile struct {
	Size      int        `json:"size"`
	DateAdded *time.Time `json:"dateAdded"`
}

type MovieList

type MovieList []Movie

func (MovieList) ByFileDate

func (movies MovieList) ByFileDate() MovieList

func (MovieList) Size

func (movies MovieList) Size() int

func (MovieList) WithFile

func (movies MovieList) WithFile() MovieList

type Radarr

type Radarr struct {
	Servarr
}

func NewRadarr

func NewRadarr(config ServarrConfig) Radarr

func (Radarr) DeleteMovie

func (r Radarr) DeleteMovie(movie Movie)

func (Radarr) DeleteMovies

func (r Radarr) DeleteMovies(movies MovieList)

func (Radarr) Movies

func (r Radarr) Movies() MovieList

func (Radarr) Tick

func (r Radarr) Tick(wg *sync.WaitGroup)

type Serie

type Serie struct {
	Id    int    `json:"id"`
	Title string `json:"title"`
}

type Servarr

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

func NewServarr

func NewServarr(config ServarrConfig, app string) Servarr

func (Servarr) Request

func (s Servarr) Request() *resty.Request

type ServarrConfig

type ServarrConfig struct {
	Name     string
	HostPath string
	ApiKey   string
	MaxDays  *int
	MaxSize  *string
	MaxFiles *int
}

type Sonarr

type Sonarr struct {
	Servarr
}

func NewSonarr

func NewSonarr(config ServarrConfig) Sonarr

func (Sonarr) DeleteEpisodes

func (s Sonarr) DeleteEpisodes(episodes EpisodeList)

func (Sonarr) EpisodeFile

func (s Sonarr) EpisodeFile(fileId int) *EpisodeFile

func (Sonarr) Episodes

func (s Sonarr) Episodes() EpisodeList

func (Sonarr) SerieEpisodes

func (s Sonarr) SerieEpisodes(serie Serie, c chan []Episode)

func (Sonarr) Series

func (s Sonarr) Series() []Serie

func (Sonarr) Tick

func (s Sonarr) Tick(wg *sync.WaitGroup)

func (Sonarr) UnmonitorEpisodes

func (s Sonarr) UnmonitorEpisodes(episodes EpisodeList)

Jump to

Keyboard shortcuts

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