Documentation ¶
Index ¶
- Constants
- type AddMovieInput
- type AddMovieOptions
- type AlternativeTitle
- type Availability
- type BulkEdit
- type Collection
- type CommandRequest
- type CommandResponse
- type CustomFormat
- type CustomFormatField
- type CustomFormatSpec
- type Exclusion
- type Field
- type History
- type HistoryRecord
- type ImportList
- type MediaInfo
- type MediaManagement
- type Movie
- type MovieFile
- type Naming
- type QualityDefinition
- type QualityProfile
- type Queue
- type QueueRecord
- type Radarr
- func (r *Radarr) AddCustomFormat(format *CustomFormat) (*CustomFormat, error)
- func (r *Radarr) AddCustomFormatContext(ctx context.Context, format *CustomFormat) (*CustomFormat, error)
- func (r *Radarr) AddExclusions(exclusions []*Exclusion) error
- func (r *Radarr) AddExclusionsContext(ctx context.Context, exclusions []*Exclusion) error
- func (r *Radarr) AddMovie(movie *AddMovieInput) (*Movie, error)
- func (r *Radarr) AddMovieContext(ctx context.Context, movie *AddMovieInput) (*Movie, error)
- func (r *Radarr) AddQualityProfile(profile *QualityProfile) (int64, error)
- func (r *Radarr) AddQualityProfileContext(ctx context.Context, profile *QualityProfile) (int64, error)
- func (r *Radarr) AddRootFolder(folder *RootFolder) (*RootFolder, error)
- func (r *Radarr) AddRootFolderContext(ctx context.Context, folder *RootFolder) (*RootFolder, error)
- func (r *Radarr) AddTag(tag *starr.Tag) (*starr.Tag, error)
- func (r *Radarr) AddTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)
- func (r *Radarr) CreateImportList(il *ImportList) (*ImportList, error)
- func (r *Radarr) CreateImportListContext(ctx context.Context, list *ImportList) (*ImportList, error)
- func (r *Radarr) DeleteCustomFormat(cfID int) error
- func (r *Radarr) DeleteCustomFormatContext(ctx context.Context, cfID int) error
- func (r *Radarr) DeleteExclusions(ids []int64) error
- func (r *Radarr) DeleteExclusionsContext(ctx context.Context, ids []int64) error
- func (r *Radarr) DeleteImportList(ids []int64) error
- func (r *Radarr) DeleteImportListContext(ctx context.Context, ids []int64) error
- func (r *Radarr) DeleteMovie(movieID int64, deleteFiles, addImportExclusion bool) error
- func (r *Radarr) DeleteMovieContext(ctx context.Context, movieID int64, deleteFiles, addImportExclusion bool) error
- func (r *Radarr) DeleteMovies(deleteMovies *BulkEdit) error
- func (r *Radarr) DeleteMoviesContext(ctx context.Context, deleteMovies *BulkEdit) error
- func (r *Radarr) DeleteQualityProfile(profileID int64) error
- func (r *Radarr) DeleteQualityProfileContext(ctx context.Context, profileID int64) error
- func (r *Radarr) DeleteRootFolder(folderID int64) error
- func (r *Radarr) DeleteRootFolderContext(ctx context.Context, folderID int64) error
- func (r *Radarr) DeleteTag(tagID int) error
- func (r *Radarr) DeleteTagContext(ctx context.Context, tagID int) error
- func (r *Radarr) EditMovies(editMovies *BulkEdit) ([]*Movie, error)
- func (r *Radarr) EditMoviesContext(ctx context.Context, editMovies *BulkEdit) ([]*Movie, error)
- func (r *Radarr) Fail(historyID int64) error
- func (r *Radarr) FailContext(ctx context.Context, historyID int64) error
- func (r *Radarr) GetBackupFiles() ([]*starr.BackupFile, error)
- func (r *Radarr) GetBackupFilesContext(ctx context.Context) ([]*starr.BackupFile, error)
- func (r *Radarr) GetCommands() ([]*CommandResponse, error)
- func (r *Radarr) GetCommandsContext(ctx context.Context) ([]*CommandResponse, error)
- func (r *Radarr) GetCustomFormats() ([]*CustomFormat, error)
- func (r *Radarr) GetCustomFormatsContext(ctx context.Context) ([]*CustomFormat, error)
- func (r *Radarr) GetExclusions() ([]*Exclusion, error)
- func (r *Radarr) GetExclusionsContext(ctx context.Context) ([]*Exclusion, error)
- func (r *Radarr) GetHistory(records, perPage int) (*History, error)
- func (r *Radarr) GetHistoryContext(ctx context.Context, records, perPage int) (*History, error)
- func (r *Radarr) GetHistoryPage(params *starr.PageReq) (*History, error)
- func (r *Radarr) GetHistoryPageContext(ctx context.Context, params *starr.PageReq) (*History, error)
- func (r *Radarr) GetImportLists() ([]*ImportList, error)
- func (r *Radarr) GetImportListsContext(ctx context.Context) ([]*ImportList, error)
- func (r *Radarr) GetMediaManagement() (*MediaManagement, error)
- func (r *Radarr) GetMediaManagementContext(ctx context.Context) (*MediaManagement, error)
- func (r *Radarr) GetMovie(tmdbID int64) ([]*Movie, error)
- func (r *Radarr) GetMovieByID(movieID int64) (*Movie, error)
- func (r *Radarr) GetMovieByIDContext(ctx context.Context, movieID int64) (*Movie, error)
- func (r *Radarr) GetMovieContext(ctx context.Context, tmdbID int64) ([]*Movie, error)
- func (r *Radarr) GetNaming() (*Naming, error)
- func (r *Radarr) GetNamingContext(ctx context.Context) (*Naming, error)
- func (r *Radarr) GetQualityDefinition(qualityDefinitionID int64) (*QualityDefinition, error)
- func (r *Radarr) GetQualityDefinitionContext(ctx context.Context, qdID int64) (*QualityDefinition, error)
- func (r *Radarr) GetQualityDefinitions() ([]*QualityDefinition, error)
- func (r *Radarr) GetQualityDefinitionsContext(ctx context.Context) ([]*QualityDefinition, error)
- func (r *Radarr) GetQualityProfiles() ([]*QualityProfile, error)
- func (r *Radarr) GetQualityProfilesContext(ctx context.Context) ([]*QualityProfile, error)
- func (r *Radarr) GetQueue(records, perPage int) (*Queue, error)
- func (r *Radarr) GetQueueContext(ctx context.Context, records, perPage int) (*Queue, error)
- func (r *Radarr) GetQueuePage(params *starr.PageReq) (*Queue, error)
- func (r *Radarr) GetQueuePageContext(ctx context.Context, params *starr.PageReq) (*Queue, error)
- func (r *Radarr) GetRootFolder(folderID int64) (*RootFolder, error)
- func (r *Radarr) GetRootFolderContext(ctx context.Context, folderID int64) (*RootFolder, error)
- func (r *Radarr) GetRootFolders() ([]*RootFolder, error)
- func (r *Radarr) GetRootFoldersContext(ctx context.Context) ([]*RootFolder, error)
- func (r *Radarr) GetSystemStatus() (*SystemStatus, error)
- func (r *Radarr) GetSystemStatusContext(ctx context.Context) (*SystemStatus, error)
- func (r *Radarr) GetTag(tagID int) (*starr.Tag, error)
- func (r *Radarr) GetTagContext(ctx context.Context, tagID int) (*starr.Tag, error)
- func (r *Radarr) GetTags() ([]*starr.Tag, error)
- func (r *Radarr) GetTagsContext(ctx context.Context) ([]*starr.Tag, error)
- func (r *Radarr) Lookup(term string) ([]*Movie, error)
- func (r *Radarr) LookupContext(ctx context.Context, term string) ([]*Movie, error)
- func (r *Radarr) SendCommand(cmd *CommandRequest) (*CommandResponse, error)
- func (r *Radarr) SendCommandContext(ctx context.Context, cmd *CommandRequest) (*CommandResponse, error)
- func (r *Radarr) UpdateCustomFormat(cf *CustomFormat, cfID int) (*CustomFormat, error)
- func (r *Radarr) UpdateCustomFormatContext(ctx context.Context, format *CustomFormat, cfID int) (*CustomFormat, error)
- func (r *Radarr) UpdateImportList(list *ImportList) (*ImportList, error)
- func (r *Radarr) UpdateImportListContext(ctx context.Context, list *ImportList) (*ImportList, error)
- func (r *Radarr) UpdateMediaManagement(mMgt *MediaManagement) (*MediaManagement, error)
- func (r *Radarr) UpdateMediaManagementContext(ctx context.Context, mMgt *MediaManagement) (*MediaManagement, error)
- func (r *Radarr) UpdateMovie(movieID int64, movie *Movie) (*Movie, error)
- func (r *Radarr) UpdateMovieContext(ctx context.Context, movieID int64, movie *Movie) (*Movie, error)
- func (r *Radarr) UpdateNaming(naming *Naming) (*Naming, error)
- func (r *Radarr) UpdateNamingContext(ctx context.Context, naming *Naming) (*Naming, error)
- func (r *Radarr) UpdateQualityDefinition(definition *QualityDefinition) (*QualityDefinition, error)
- func (r *Radarr) UpdateQualityDefinitionContext(ctx context.Context, definition *QualityDefinition) (*QualityDefinition, error)
- func (r *Radarr) UpdateQualityDefinitions(definition []*QualityDefinition) ([]*QualityDefinition, error)
- func (r *Radarr) UpdateQualityDefinitionsContext(ctx context.Context, definition []*QualityDefinition) ([]*QualityDefinition, error)
- func (r *Radarr) UpdateQualityProfile(profile *QualityProfile) error
- func (r *Radarr) UpdateQualityProfileContext(ctx context.Context, profile *QualityProfile) error
- func (r *Radarr) UpdateTag(tag *starr.Tag) (*starr.Tag, error)
- func (r *Radarr) UpdateTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)
- type RootFolder
- type SelectOption
- type SystemStatus
Constants ¶
const ( FilterUnknown starr.Filtering = iota FilterGrabbed FilterDownloadFolderImported FilterDownloadFailed FilterFileDeleted FilterRenamed FilterIgnored )
Filter values are integers. Given names for ease of discovery. https://github.com/Radarr/Radarr/blob/2bca1a71a2ed5130ea642343cb76250f3bf5bc4e/src/NzbDrone.Core/History/History.cs#L33-L44
const APIver = "v3"
APIver is the Radarr API version supported by this library.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddMovieInput ¶
type AddMovieInput struct { Title string `json:"title,omitempty"` TitleSlug string `json:"titleSlug,omitempty"` MinimumAvailability Availability `json:"minimumAvailability,omitempty"` RootFolderPath string `json:"rootFolderPath"` TmdbID int64 `json:"tmdbId"` QualityProfileID int64 `json:"qualityProfileId"` ProfileID int64 `json:"profileId,omitempty"` Year int `json:"year,omitempty"` Images []*starr.Image `json:"images,omitempty"` AddOptions *AddMovieOptions `json:"addOptions"` Tags []int `json:"tags,omitempty"` Monitored bool `json:"monitored"` }
AddMovieInput is the input for a new movie.
type AddMovieOptions ¶
type AddMovieOptions struct {
SearchForMovie bool `json:"searchForMovie"`
}
AddMovieOptions are the options for finding a new movie.
type AlternativeTitle ¶
type AlternativeTitle struct { MovieMetadataID int64 `json:"movieMetadataId"` MovieID int64 `json:"movieId"` Title string `json:"title"` SourceType string `json:"sourceType"` SourceID int64 `json:"sourceId"` Votes int `json:"votes"` VoteCount int `json:"voteCount"` Language *starr.Value `json:"language"` ID int64 `json:"id"` }
AlternativeTitle is part of a Movie.
type Availability ¶
type Availability string
Availability is an enum used as MinimumAvailability in a few places throughout Radarr.
const ( AvailabilityToBeAnnounced Availability = "tba" AvailabilityAnnounced Availability = "announced" AvailabilityInCinemas Availability = "inCinemas" AvailabilityReleased Availability = "released" AvailabilityDeleted Availability = "deleted" )
Availability / MinimumAvailability constants. https://radarr.video/docs/api/#/MovieEditor/put_api_v3_movie_editor
func (Availability) Ptr ¶
func (a Availability) Ptr() *Availability
Ptr returns a pointer to a minimum availability. Useful for a BulkEdit struct.
type BulkEdit ¶
type BulkEdit struct { MovieIDs []int64 `json:"movieIds"` Monitored *bool `json:"monitored,omitempty"` QualityProfileID *int64 `json:"qualityProfileId,omitempty"` MinimumAvailability *Availability `json:"minimumAvailability,omitempty"` // tba RootFolderPath *string `json:"rootFolderPath,omitempty"` // path Tags []int `json:"tags,omitempty"` // [0] ApplyTags *starr.ApplyTags `json:"applyTags,omitempty"` // add MoveFiles *bool `json:"moveFiles,omitempty"` DeleteFiles *bool `json:"deleteFiles,omitempty"` // delete only AddImportExclusion *bool `json:"addImportExclusion,omitempty"` // delete only }
BulkEdit is the input for the bulk movie editor endpoint. You may use starr.True(), starr.False(), starr.Int64(), and starr.String() to add data to the struct members. Use Availability.Ptr() to add a value to minimum availability, and starr.ApplyTags.Ptr() for apply tags.
type Collection ¶
type Collection struct { Name string `json:"name"` TmdbID int64 `json:"tmdbId"` Images []*starr.Image `json:"images"` }
Collection belongs to a Movie.
type CommandRequest ¶
type CommandRequest struct { Name string `json:"name"` MovieIDs []int64 `json:"movieIds,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 ¶
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 CustomFormat ¶
type CustomFormat struct { ID int `json:"id"` Name string `json:"name"` IncludeCFWhenRenaming bool `json:"includeCustomFormatWhenRenaming"` Specifications []*CustomFormatSpec `json:"specifications"` }
CustomFormat is the api/customformat endpoint payload.
type CustomFormatField ¶
type CustomFormatField struct { Order int `json:"order"` Name string `json:"name"` Label string `json:"label"` Value interface{} `json:"value"` // should be a string, but sometimes it's a number. Type string `json:"type"` Advanced bool `json:"advanced"` }
CustomFormatField is part of a CustomFormat Specification.
type CustomFormatSpec ¶
type CustomFormatSpec 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 []*CustomFormatField `json:"fields"` }
CustomFormatSpec is part of a CustomFormat.
type Exclusion ¶
type Exclusion struct { TMDBID int64 `json:"tmdbId"` Title string `json:"movieTitle"` Year int `json:"movieYear"` ID int64 `json:"id,omitempty"` }
Exclusion is a Radarr excluded item.
type Field ¶
type Field struct { Name string `json:"name"` Value interface{} `json:"value"` // sometimes number, sometimes string. 'Type' may tell you. Label string `json:"label"` HelpText string `json:"helpText"` Type string `json:"type"` Order int64 `json:"order"` Advanced bool `json:"advanced"` SelectOptions []*SelectOption `json:"selectOptions,omitempty"` }
Field is currently only part of ImportList.
type History ¶
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 /api/v3/history endpoint.
type HistoryRecord ¶
type HistoryRecord struct { ID int64 `json:"id"` MovieID int64 `json:"movieId"` SourceTitle string `json:"sourceTitle"` Languages []*starr.Value `json:"languages"` Quality *starr.Quality `json:"quality"` CustomFormats []interface{} `json:"customFormats"` QualityCutoffNotMet bool `json:"qualityCutoffNotMet"` Date time.Time `json:"date"` DownloadID string `json:"downloadId"` 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"` IndexerFlags string `json:"indexerFlags"` IndexerID string `json:"indexerId"` Message string `json:"message"` NzbInfoURL string `json:"nzbInfoUrl"` Protocol string `json:"protocol"` PublishedDate time.Time `json:"publishedDate"` Reason string `json:"reason"` ReleaseGroup string `json:"releaseGroup"` Size string `json:"size"` TmdbID string `json:"tmdbId"` TorrentInfoHash string `json:"torrentInfoHash"` } `json:"data"` }
HistoryRecord is part of the History data. Not all items have all Data members. Check EventType for what you need.
type ImportList ¶
type ImportList struct { ID int64 `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` EnableAuto bool `json:"enableAuto"` ShouldMonitor bool `json:"shouldMonitor"` SearchOnAdd bool `json:"searchOnAdd"` RootFolderPath string `json:"rootFolderPath"` QualityProfileID int64 `json:"qualityProfileId"` MinimumAvailability Availability `json:"minimumAvailability"` ListType string `json:"listType"` ListOrder int64 `json:"listOrder"` Fields []*Field `json:"fields"` ImplementationName string `json:"implementationName"` Implementation string `json:"implementation"` ConfigContract string `json:"configContract"` InfoLink string `json:"infoLink"` Tags []int `json:"tags"` }
ImportList represents the api/v3/importlist endpoint.
type MediaInfo ¶
type MediaInfo struct { AudioAdditionalFeatures string `json:"audioAdditionalFeatures"` 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"` VideoDynamicRangeType string `json:"videoDynamicRangeType"` Resolution string `json:"resolution"` RunTime string `json:"runTime"` ScanType string `json:"scanType"` Subtitles string `json:"subtitles"` }
MediaInfo is part of a MovieFile.
type MediaManagement ¶
type MediaManagement struct { AutoRenameFolders bool `json:"autoRenameFolders,omitempty"` AutoUnmonitorPreviouslyDownloadedMovies bool `json:"autoUnmonitorPreviouslyDownloadedMovies,omitempty"` CopyUsingHardlinks bool `json:"copyUsingHardlinks,omitempty"` CreateEmptyMovieFolders bool `json:"createEmptyMovieFolders,omitempty"` DeleteEmptyFolders bool `json:"deleteEmptyFolders,omitempty"` EnableMediaInfo bool `json:"enableMediaInfo,omitempty"` ImportExtraFiles bool `json:"importExtraFiles,omitempty"` PathsDefaultStatic bool `json:"pathsDefaultStatic,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"` 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 Movie ¶
type Movie struct { ID int64 `json:"id"` Title string `json:"title,omitempty"` Path string `json:"path,omitempty"` MinimumAvailability Availability `json:"minimumAvailability,omitempty"` QualityProfileID int64 `json:"qualityProfileId,omitempty"` TmdbID int64 `json:"tmdbId,omitempty"` OriginalTitle string `json:"originalTitle,omitempty"` AlternateTitles []*AlternativeTitle `json:"alternateTitles,omitempty"` SecondaryYearSourceID int `json:"secondaryYearSourceId,omitempty"` SortTitle string `json:"sortTitle,omitempty"` SizeOnDisk int64 `json:"sizeOnDisk,omitempty"` Status string `json:"status,omitempty"` Overview string `json:"overview,omitempty"` InCinemas time.Time `json:"inCinemas,omitempty"` PhysicalRelease time.Time `json:"physicalRelease,omitempty"` DigitalRelease time.Time `json:"digitalRelease,omitempty"` Images []*starr.Image `json:"images,omitempty"` Website string `json:"website,omitempty"` Year int `json:"year,omitempty"` YouTubeTrailerID string `json:"youTubeTrailerId,omitempty"` Studio string `json:"studio,omitempty"` FolderName string `json:"folderName,omitempty"` Runtime int `json:"runtime,omitempty"` CleanTitle string `json:"cleanTitle,omitempty"` ImdbID string `json:"imdbId,omitempty"` TitleSlug string `json:"titleSlug,omitempty"` Certification string `json:"certification,omitempty"` Genres []string `json:"genres,omitempty"` Tags []int `json:"tags,omitempty"` Added time.Time `json:"added,omitempty"` Ratings starr.OpenRatings `json:"ratings,omitempty"` MovieFile *MovieFile `json:"movieFile,omitempty"` Collection *Collection `json:"collection,omitempty"` HasFile bool `json:"hasFile,omitempty"` IsAvailable bool `json:"isAvailable,omitempty"` Monitored bool `json:"monitored"` Popularity float64 `json:"popularity"` OriginalLanguage *starr.Value `json:"originalLanguage,omitempty"` AddOptions *AddMovieOptions `json:"addOptions,omitempty"` // only available upon adding a movie. }
Movie is the /api/v3/movie endpoint.
type MovieFile ¶
type MovieFile struct { ID int64 `json:"id"` MovieID int64 `json:"movieId"` RelativePath string `json:"relativePath"` Path string `json:"path"` Size int64 `json:"size"` DateAdded time.Time `json:"dateAdded"` SceneName string `json:"sceneName"` IndexerFlags int64 `json:"indexerFlags"` Quality *starr.Quality `json:"quality"` MediaInfo *MediaInfo `json:"mediaInfo"` QualityCutoffNotMet bool `json:"qualityCutoffNotMet"` Languages []*starr.Value `json:"languages"` ReleaseGroup string `json:"releaseGroup"` Edition string `json:"edition"` OriginalFilePath string `json:"originalFilePath"` }
MovieFile is part of a Movie.
type Naming ¶
type Naming struct { RenameMovies bool `json:"renameMovies,omitempty"` ReplaceIllegalCharacters bool `json:"replaceIllegalCharacters,omitempty"` IncludeQuality bool `json:"includeQuality,omitempty"` ReplaceSpaces bool `json:"replaceSpaces,omitempty"` ID int64 `json:"id"` // ID must always be 1 (Oct 10, 2022) ColonReplacementFormat string `json:"colonReplacementFormat,omitempty"` StandardMovieFormat string `json:"standardMovieFormat"` // required MovieFolderFormat string `json:"movieFolderFormat"` // required Separator string `json:"separatort,omitempty"` NumberStyle string `json:"numberStylet,omitempty"` }
Naming represents the config/naming endpoint in Radarr.
type QualityDefinition ¶
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"` Title string `json:"title"` Quality *starr.BaseQuality `json:"quality"` }
QualityDefinition is the /api/v3/qualitydefinition endpoint.
type QualityProfile ¶
type QualityProfile struct { ID int64 `json:"id"` Name string `json:"name"` UpgradeAllowed bool `json:"upgradeAllowed"` Cutoff int64 `json:"cutoff"` Qualities []*starr.Quality `json:"items"` MinFormatScore int64 `json:"minFormatScore"` CutoffFormatScore int64 `json:"cutoffFormatScore"` FormatItems []*starr.FormatItem `json:"formatItems,omitempty"` Language *starr.Value `json:"language"` }
QualityProfile is applied to Movies.
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 { MovieID int64 `json:"movieId"` Languages []*starr.Value `json:"languages"` Quality *starr.Quality `json:"quality"` CustomFormats []interface{} `json:"customFormats"` // probably []int64 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"` ID int64 `json:"id"` ErrorMessage string `json:"errorMessage"` }
QueueRecord is part of the activity Queue.
type Radarr ¶
Radarr contains all the methods to interact with a Radarr server.
func (*Radarr) AddCustomFormat ¶
func (r *Radarr) AddCustomFormat(format *CustomFormat) (*CustomFormat, error)
AddCustomFormat creates a new custom format and returns the response (with ID).
func (*Radarr) AddCustomFormatContext ¶
func (r *Radarr) AddCustomFormatContext(ctx context.Context, format *CustomFormat) (*CustomFormat, error)
AddCustomFormatContext creates a new custom format and returns the response (with ID).
func (*Radarr) AddExclusions ¶
AddExclusions adds an exclusion to Radarr.
func (*Radarr) AddExclusionsContext ¶
AddExclusionsContext adds an exclusion to Radarr.
func (*Radarr) AddMovie ¶
func (r *Radarr) AddMovie(movie *AddMovieInput) (*Movie, error)
AddMovie adds a movie to the queue.
func (*Radarr) AddMovieContext ¶
AddMovieContext adds a movie to the queue.
func (*Radarr) AddQualityProfile ¶
func (r *Radarr) AddQualityProfile(profile *QualityProfile) (int64, error)
AddQualityProfile updates a quality profile in place.
func (*Radarr) AddQualityProfileContext ¶
func (r *Radarr) AddQualityProfileContext(ctx context.Context, profile *QualityProfile) (int64, error)
AddQualityProfileContext updates a quality profile in place.
func (*Radarr) AddRootFolder ¶
func (r *Radarr) AddRootFolder(folder *RootFolder) (*RootFolder, error)
AddRootFolder creates a root folder.
func (*Radarr) AddRootFolderContext ¶
func (r *Radarr) AddRootFolderContext(ctx context.Context, folder *RootFolder) (*RootFolder, error)
AddRootFolderContext creates a root folder.
func (*Radarr) AddTagContext ¶
AddTagContext creates a tag.
func (*Radarr) CreateImportList ¶
func (r *Radarr) CreateImportList(il *ImportList) (*ImportList, error)
CreateImportList creates an import list in Radarr.
func (*Radarr) CreateImportListContext ¶
func (r *Radarr) CreateImportListContext(ctx context.Context, list *ImportList) (*ImportList, error)
CreateImportListContext creates an import list in Radarr.
func (*Radarr) DeleteCustomFormat ¶
DeleteCustomFormat deletes a custom format.
func (*Radarr) DeleteCustomFormatContext ¶
DeleteCustomFormatContext deletes a custom format.
func (*Radarr) DeleteExclusions ¶
DeleteExclusions removes exclusions from Radarr.
func (*Radarr) DeleteExclusionsContext ¶
DeleteExclusionsContext removes exclusions from Radarr.
func (*Radarr) DeleteImportList ¶
DeleteImportList removes an import list from Radarr.
func (*Radarr) DeleteImportListContext ¶
DeleteImportListContext removes an import list from Radarr.
func (*Radarr) DeleteMovie ¶
DeleteMovie removes a movie from the database. Setting deleteFiles true will delete all content for the movie.
func (*Radarr) DeleteMovieContext ¶
func (r *Radarr) DeleteMovieContext(ctx context.Context, movieID int64, deleteFiles, addImportExclusion bool) error
DeleteMovieContext removes a movie from the database. Setting deleteFiles true will delete all content for the movie.
func (*Radarr) DeleteMovies ¶
DeleteMovies bulk deletes movies. Can also mark them as excluded, and delete their files.
func (*Radarr) DeleteMoviesContext ¶
DeleteDeleteMoviesContextMovies bulk deletes movies. Can also mark them as excluded, and delete their files.
func (*Radarr) DeleteQualityProfile ¶
DeleteQualityProfile deletes a quality profile.
func (*Radarr) DeleteQualityProfileContext ¶
DeleteQualityProfileContext deletes a quality profile.
func (*Radarr) DeleteRootFolder ¶
DeleteRootFolder removes a single root folder.
func (*Radarr) DeleteRootFolderContext ¶
DeleteRootFolderContext removes a single root folder.
func (*Radarr) DeleteTagContext ¶
DeleteTagContext removes a single tag.
func (*Radarr) EditMovies ¶
EditMovies allows bulk diting many movies at once.
func (*Radarr) EditMoviesContext ¶
EditMoviesContext allows bulk diting many movies at once.
func (*Radarr) FailContext ¶
FailContext marks the given history item as failed by id.
func (*Radarr) GetBackupFiles ¶
func (r *Radarr) GetBackupFiles() ([]*starr.BackupFile, error)
GetBackupFiles returns all available Radarr backup files. Use GetBody to download a file using BackupFile.Path.
func (*Radarr) GetBackupFilesContext ¶
GetBackupFilesContext returns all available Radarr backup files. Use GetBody to download a file using BackupFile.Path.
func (*Radarr) GetCommands ¶
func (r *Radarr) GetCommands() ([]*CommandResponse, error)
GetCommands returns all available Radarr commands.
func (*Radarr) GetCommandsContext ¶
func (r *Radarr) GetCommandsContext(ctx context.Context) ([]*CommandResponse, error)
GetCommandsContext returns all available Radarr commands.
func (*Radarr) GetCustomFormats ¶
func (r *Radarr) GetCustomFormats() ([]*CustomFormat, error)
GetCustomFormats returns all configured Custom Formats.
func (*Radarr) GetCustomFormatsContext ¶
func (r *Radarr) GetCustomFormatsContext(ctx context.Context) ([]*CustomFormat, error)
GetCustomFormatsContext returns all configured Custom Formats.
func (*Radarr) GetExclusions ¶
GetExclusions returns all configured exclusions from Radarr.
func (*Radarr) GetExclusionsContext ¶
GetExclusionsContext returns all configured exclusions from Radarr.
func (*Radarr) GetHistory ¶
GetHistory returns the Radarr History (grabs/failures/completed). WARNING: 12/30/2021 - this method changed. The second argument no longer controls which page is returned, but instead adjusts the pagination size. If you need control over the page, use radarr.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 (*Radarr) GetHistoryContext ¶
GetHistoryContext returns the Radarr History (grabs/failures/completed).
func (*Radarr) GetHistoryPage ¶
GetHistoryPage returns a single page from the Radarr History (grabs/failures/completed). The page size and number is configurable with the input request parameters.
func (*Radarr) GetHistoryPageContext ¶
func (r *Radarr) GetHistoryPageContext(ctx context.Context, params *starr.PageReq) (*History, error)
GetHistoryPageContext returns a single page from the Radarr History (grabs/failures/completed). The page size and number is configurable with the input request parameters.
func (*Radarr) GetImportLists ¶
func (r *Radarr) GetImportLists() ([]*ImportList, error)
GetImportLists returns all import lists.
func (*Radarr) GetImportListsContext ¶
func (r *Radarr) GetImportListsContext(ctx context.Context) ([]*ImportList, error)
GetImportListsContext returns all import lists.
func (*Radarr) GetMediaManagement ¶
func (r *Radarr) GetMediaManagement() (*MediaManagement, error)
GetMediaManagement returns the media management.
func (*Radarr) GetMediaManagementContext ¶
func (r *Radarr) GetMediaManagementContext(ctx context.Context) (*MediaManagement, error)
GetMediaManagement returns the media management.
func (*Radarr) GetMovieByID ¶
GetMovieByID grabs a movie from the database by DB [movie] ID.
func (*Radarr) GetMovieByIDContext ¶
GetMovieByIDContext grabs a movie from the database by DB [movie] ID.
func (*Radarr) GetMovieContext ¶
GetMovieContext grabs a movie from the queue, or all movies if tmdbId is 0.
func (*Radarr) GetNamingContext ¶
GetNamingContext returns the file naming rules.
func (*Radarr) GetQualityDefinition ¶
func (r *Radarr) GetQualityDefinition(qualityDefinitionID int64) (*QualityDefinition, error)
GetQualityDefinition returns a single quality definition.
func (*Radarr) GetQualityDefinitionContext ¶
func (r *Radarr) GetQualityDefinitionContext(ctx context.Context, qdID int64) (*QualityDefinition, error)
GetQualityDefinitionContext returns a single quality definition.
func (*Radarr) GetQualityDefinitions ¶
func (r *Radarr) GetQualityDefinitions() ([]*QualityDefinition, error)
GetQualityDefinitions returns all configured quality definitions.
func (*Radarr) GetQualityDefinitionsContext ¶
func (r *Radarr) GetQualityDefinitionsContext(ctx context.Context) ([]*QualityDefinition, error)
GetQualityDefinitionsContext returns all configured quality definitions.
func (*Radarr) GetQualityProfiles ¶
func (r *Radarr) GetQualityProfiles() ([]*QualityProfile, error)
GetQualityProfiles returns all configured quality profiles.
func (*Radarr) GetQualityProfilesContext ¶
func (r *Radarr) GetQualityProfilesContext(ctx context.Context) ([]*QualityProfile, error)
GetQualityProfilesContext returns all configured quality profiles.
func (*Radarr) GetQueue ¶
GetQueue returns a single page from the Radarr Queue (processing, but not yet imported). WARNING: 12/30/2021 - this method changed. The second argument no longer controls which page is returned, but instead adjusts the pagination size. If you need control over the page, use radarr.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 (*Radarr) GetQueueContext ¶
GetQueueContext returns a single page from the Radarr Queue (processing, but not yet imported).
func (*Radarr) GetQueuePage ¶
GetQueuePage returns a single page from the Radarr Queue. The page size and number is configurable with the input request parameters.
func (*Radarr) GetQueuePageContext ¶
GetQueuePage returns a single page from the Radarr Queue. The page size and number is configurable with the input request parameters.
func (*Radarr) GetRootFolder ¶
func (r *Radarr) GetRootFolder(folderID int64) (*RootFolder, error)
GetRootFolder returns a single root folder.
func (*Radarr) GetRootFolderContext ¶
GetRootFolderContext returns a single root folder.
func (*Radarr) GetRootFolders ¶
func (r *Radarr) GetRootFolders() ([]*RootFolder, error)
GetRootFolders returns all configured root folders.
func (*Radarr) GetRootFoldersContext ¶
func (r *Radarr) GetRootFoldersContext(ctx context.Context) ([]*RootFolder, error)
GetRootFoldersContext returns all configured root folders.
func (*Radarr) GetSystemStatus ¶
func (r *Radarr) GetSystemStatus() (*SystemStatus, error)
GetSystemStatus returns system status.
func (*Radarr) GetSystemStatusContext ¶
func (r *Radarr) GetSystemStatusContext(ctx context.Context) (*SystemStatus, error)
GetSystemStatusContext returns system status.
func (*Radarr) GetTagContext ¶
GetTagContext returns a single tag.
func (*Radarr) GetTagsContext ¶
GetTagsContext returns all configured tags.
func (*Radarr) LookupContext ¶
LookupContext will search for movies matching the specified search term.
func (*Radarr) SendCommand ¶
func (r *Radarr) SendCommand(cmd *CommandRequest) (*CommandResponse, error)
SendCommand sends a command to Radarr.
func (*Radarr) SendCommandContext ¶
func (r *Radarr) SendCommandContext(ctx context.Context, cmd *CommandRequest) (*CommandResponse, error)
SendCommandContext sends a command to Radarr.
func (*Radarr) UpdateCustomFormat ¶
func (r *Radarr) UpdateCustomFormat(cf *CustomFormat, cfID int) (*CustomFormat, error)
UpdateCustomFormat updates an existing custom format and returns the response.
func (*Radarr) UpdateCustomFormatContext ¶
func (r *Radarr) UpdateCustomFormatContext(ctx context.Context, format *CustomFormat, cfID int) (*CustomFormat, error)
UpdateCustomFormatContext updates an existing custom format and returns the response.
func (*Radarr) UpdateImportList ¶
func (r *Radarr) UpdateImportList(list *ImportList) (*ImportList, error)
UpdateImportList updates an existing import list and returns the response.
func (*Radarr) UpdateImportListContext ¶
func (r *Radarr) UpdateImportListContext(ctx context.Context, list *ImportList) (*ImportList, error)
UpdateImportListContext updates an existing import list and returns the response.
func (*Radarr) UpdateMediaManagement ¶
func (r *Radarr) UpdateMediaManagement(mMgt *MediaManagement) (*MediaManagement, error)
UpdateMediaManagement updates the media management.
func (*Radarr) UpdateMediaManagementContext ¶
func (r *Radarr) UpdateMediaManagementContext(ctx context.Context, mMgt *MediaManagement) (*MediaManagement, error)
UpdateMediaManagementContext updates the media management.
func (*Radarr) UpdateMovie ¶
UpdateMovie sends a PUT request to update a movie in place.
func (*Radarr) UpdateMovieContext ¶
func (r *Radarr) UpdateMovieContext(ctx context.Context, movieID int64, movie *Movie) (*Movie, error)
UpdateMovieContext sends a PUT request to update a movie in place.
func (*Radarr) UpdateNaming ¶
UpdateNaming updates the file naming rules.
func (*Radarr) UpdateNamingContext ¶
UpdateNamingContext updates the file naming rules.
func (*Radarr) UpdateQualityDefinition ¶
func (r *Radarr) UpdateQualityDefinition(definition *QualityDefinition) (*QualityDefinition, error)
UpdateQualityDefinition updates a quality definition.
func (*Radarr) UpdateQualityDefinitionContext ¶
func (r *Radarr) UpdateQualityDefinitionContext( ctx context.Context, definition *QualityDefinition, ) (*QualityDefinition, error)
UpdateQualityDefinitionContext updates a quality definition.
func (*Radarr) UpdateQualityDefinitions ¶
func (r *Radarr) UpdateQualityDefinitions(definition []*QualityDefinition) ([]*QualityDefinition, error)
UpdateQualityDefinitions updates all quality definitions.
func (*Radarr) UpdateQualityDefinitionsContext ¶
func (r *Radarr) UpdateQualityDefinitionsContext( ctx context.Context, definition []*QualityDefinition, ) ([]*QualityDefinition, error)
UpdateQualityDefinitionsContext updates all quality definitions.
func (*Radarr) UpdateQualityProfile ¶
func (r *Radarr) UpdateQualityProfile(profile *QualityProfile) error
UpdateQualityProfile updates a quality profile in place.
func (*Radarr) UpdateQualityProfileContext ¶
func (r *Radarr) UpdateQualityProfileContext(ctx context.Context, profile *QualityProfile) error
UpdateQualityProfileContext updates a quality profile in place.
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 SelectOption ¶
type SelectOption struct { Value int `json:"value"` Name string `json:"name"` Order int `json:"order"` DividerAfter bool `json:"dividerAfter"` }
SelectOption is part of a Field from an ImportList.
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"` DatabaseType string `json:"databaseType"` DatabaseVersion string `json:"databaseVersion"` InstanceName string `json:"instanceName"` IsAdmin bool `json:"isAdmin"` IsDebug bool `json:"isDebug"` IsDocker bool `json:"isDocker"` IsLinux bool `json:"isLinux"` IsNetCore bool `json:"isNetCore"` IsOsx bool `json:"isOsx"` IsProduction bool `json:"isProduction"` IsUserInteractive bool `json:"isUserInteractive"` IsWindows bool `json:"isWindows"` MigrationVersion int64 `json:"migrationVersion"` Mode string `json:"mode"` OsName string `json:"osName"` PackageAuthor string `json:"packageAuthor"` PackageUpdateMechanism string `json:"packageUpdateMechanism"` PackageVersion string `json:"packageVersion"` RuntimeName string `json:"runtimeName"` RuntimeVersion string `json:"runtimeVersion"` 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.