radarr

package
v0.0.0-...-901919a Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeApplicationUpdate EventType = "ApplicationUpdate"
	EventTypeDownloadUpgrade   EventType = "Download"
	EventTypeGrab              EventType = "Grab"
	EventTypeHealthIssue       EventType = "HealthIssue"
	EventTypeRename            EventType = "Rename"
	EventTypeTest              EventType = "Test"
	EventTypeUnknown           EventType = "Unknown"

	IssueLevelOk      IssueLevel = "Ok"
	IssueLevelNotice  IssueLevel = "Notice"
	IssueLevelWarning IssueLevel = "Warning"
	IssueLevelError   IssueLevel = "Error"
	IssueLevelUnknown IssueLevel = "Unknown"
)

Variables

View Source
var (
	DefaultGrabHandlers              = []GrabHandler{}
	DefaultDownloadUpgradeHandlers   = []DownloadUpgradeHandler{}
	DefaultRenameHandlers            = []RenameHandler{}
	DefaultHealthCheckHandlers       = []HealthCheckHandler{}
	DefaultApplicationUpdateHandlers = []ApplicationUpdateHandler{}
)

Functions

func AddApplicationUpdateHandler

func AddApplicationUpdateHandler(handler ApplicationUpdateHandler)

func AddDownloadUpgradeHandler

func AddDownloadUpgradeHandler(handler DownloadUpgradeHandler)

func AddGrabHandler

func AddGrabHandler(handler GrabHandler)

func AddHealthCheckHandler

func AddHealthCheckHandler(handler HealthCheckHandler)

func AddRenameHandler

func AddRenameHandler(handler RenameHandler)

func EnableDefaultHandlers

func EnableDefaultHandlers()

func Run

func Run(ctx context.Context)

Types

type ApplicationUpdateHandler

type ApplicationUpdateHandler struct {
	Name string

	OnApplicationUpdate ApplicationUpdateHandlerFunc
}

type ApplicationUpdateHandlerFunc

type ApplicationUpdateHandlerFunc = func(context.Context, ApplicationUpdateParams) error

type ApplicationUpdateParams

type ApplicationUpdateParams struct {
	Update Update
}

type Download

type Download struct {
	ID     string `arr:"radarr_download_id"`
	Client string `arr:"radarr_download_client"`
}

type DownloadUpgradeHandler

type DownloadUpgradeHandler struct {
	Name string

	OnDownloadUpgrade DownloadUpgradeHandlerFunc
}

type DownloadUpgradeHandlerFunc

type DownloadUpgradeHandlerFunc = func(context.Context, DownloadUpgradeParams) error

type DownloadUpgradeParams

type DownloadUpgradeParams struct {
	Download  Download
	IsUpgrade bool `arr:"radarr_isupgrade"`
	Movie     Movie
	MovieFile MovieFile

	DeletedRelativePaths []string `arr:"radarr_deletedrelativepaths" sep:"|"`
	DeletedPaths         []string `arr:"radarr_deletedpaths" sep:"|"`
}

type EventType

type EventType string

func (EventType) String

func (e EventType) String() string

func (*EventType) UnmarshalText

func (e *EventType) UnmarshalText(text []byte) error

Implement encoding.ArrUnmarshaler

type GrabDownload

type GrabDownload struct {
	ID     string  `arr:"radarr_download_id"`
	Client *string `arr:"radarr_download_client"`
}

type GrabHandler

type GrabHandler struct {
	Name string

	OnGrab GrabHandlerFunc
}

type GrabHandlerFunc

type GrabHandlerFunc = func(context.Context, GrabParams) error

type GrabMovie

type GrabMovie struct {
	ID    int    `arr:"radarr_movie_id"`
	Title string `arr:"radarr_movie_title"`
	Year  int    `arr:"radarr_movie_year"`

	ImdbID *string `arr:"radarr_movie_imdbid"`
	TmdbID string  `arr:"radarr_movie_tmdbid"`

	InCinemasDate       *time.Time `arr:"radarr_movie_in_cinemas_date"`
	PhysicalReleaseDate *time.Time `arr:"radarr_movie_physical_release_date"`
}

Doesn't have path

type GrabParams

type GrabParams struct {
	Download GrabDownload
	Movie    GrabMovie
	Release  Release
}

type HealthCheckHandler

type HealthCheckHandler struct {
	Name string

	OnHealthCheck HealthCheckHandlerFunc
}

type HealthCheckHandlerFunc

type HealthCheckHandlerFunc = func(context.Context, HealthCheckParams) error

type HealthCheckParams

type HealthCheckParams struct {
	Issue Issue
}

type Issue

type Issue struct {
	Level   IssueLevel `arr:"radarr_health_issue_level"`
	Message string     `arr:"radarr_health_issue_level"`
	Type    string     `arr:"radarr_health_issue_level"`
	Wiki    *string    `arr:"radarr_health_issue_level"`
}

type IssueLevel

type IssueLevel string

func (IssueLevel) String

func (h IssueLevel) String() string

func (*IssueLevel) UnmarshalArr

func (h *IssueLevel) UnmarshalArr(text string) error

Implement encoding.ArrUnmarshaler

type Movie

type Movie struct {
	ID    int    `arr:"radarr_movie_id"`
	Path  string `arr:"radarr_movie_path"`
	Title string `arr:"radarr_movie_title"`
	Year  int    `arr:"radarr_movie_year"`

	ImdbID string `arr:"radarr_movie_imdbid"`
	TmdbID string `arr:"radarr_movie_tmdbid"`

	InCinemasDate       *time.Time `arr:"radarr_movie_in_cinemas_date"`
	PhysicalReleaseDate *time.Time `arr:"radarr_movie_physical_release_date"`
}

type MovieFile

type MovieFile struct {
	Id             int     `arr:"radarr_moviefile_id"`
	Path           string  `arr:"radarr_moviefile_path"`
	Quality        string  `arr:"radarr_moviefile_quality"`
	QualityVersion string  `arr:"radarr_moviefile_qualityversion"`
	RelativePath   string  `arr:"radarr_moviefile_relativepath"`
	ReleaseGroup   *string `arr:"radarr_moviefile_releasegroup"`
	SceneName      *string `arr:"radarr_moviefile_scenename"`
	SourceFolder   string  `arr:"radarr_moviefile_sourcefolder"`
	SourcePath     string  `arr:"radarr_moviefile_sourcepath"`
}

type Release

type Release struct {
	Indexer        string  `arr:"radarr_release_indexer"`
	Quality        string  `arr:"radarr_release_quality"`
	QualityVersion string  `arr:"radarr_release_qualityversion"`
	ReleaseGroup   *string `arr:"radarr_release_releasegroup"`
	Title          string  `arr:"radarr_release_title"`
	// in bytes
	Size int `arr:"radarr_release_size"`
}

type RenameHandler

type RenameHandler struct {
	Name string

	OnRename RenameHandlerFunc
}

type RenameHandlerFunc

type RenameHandlerFunc = func(context.Context, RenameParams) error

type RenameMovieFile

type RenameMovieFile struct {
	IDs                   []int    `arr:"radarr_moviefile_ids"`
	RelativePaths         []string `arr:"radarr_moviefile_ids" sep:"|"`
	Paths                 []string `arr:"radarr_moviefile_ids" sep:"|"`
	PreviousRelativePaths []string `arr:"radarr_moviefile_ids" sep:"|"`
	PreviousPaths         []string `arr:"radarr_moviefile_ids" sep:"|"`
}

type RenameParams

type RenameParams struct {
	Movie     Movie
	MovieFile RenameMovieFile
}

type Runner

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

func NewRunner

func NewRunner(logger zerolog.Logger) *Runner

func (*Runner) AddApplicationUpdateHandler

func (r *Runner) AddApplicationUpdateHandler(handler ApplicationUpdateHandler)

func (*Runner) AddDownloadUpgradeHandler

func (r *Runner) AddDownloadUpgradeHandler(handler DownloadUpgradeHandler)

func (*Runner) AddGrabHandler

func (r *Runner) AddGrabHandler(handler GrabHandler)

func (*Runner) AddHealthCheckHandler

func (r *Runner) AddHealthCheckHandler(handler HealthCheckHandler)

func (*Runner) AddRenameHandler

func (r *Runner) AddRenameHandler(handler RenameHandler)

func (*Runner) EnableDefaultHandlers

func (r *Runner) EnableDefaultHandlers()

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

func (*Runner) SetTestHandler

func (r *Runner) SetTestHandler(handler TestHandler)

type TestHandler

type TestHandler struct {
	Name string

	OnTest TestHandlerFunc
}

type TestHandlerFunc

type TestHandlerFunc func(context.Context, TestParams) error

type TestParams

type TestParams struct {
}

type Update

type Update struct {
	Message         string `arr:"radarr_update_message"`
	NewVersion      string `arr:"radarr_update_newversion"`
	PreviousVersion string `arr:"radarr_update_previousversion"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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