Documentation
¶
Overview ¶
Package v3 provides a Radarr v3 API compatibility layer.
External tools like Overseerr, Jellyseerr, Homepage, and others have a built-in "Radarr" integration. This package exposes the subset of the Radarr v3 API surface that those tools actually call, translating between Radarr's response shapes and Prism's existing service layer.
Index ¶
- func Auth(api huma.API, apiKey []byte) func(huma.Context, func(huma.Context))
- func RegisterRoutes(api huma.API, cfg Config)
- type Config
- type RadarrCommand
- type RadarrCommandResponse
- type RadarrImage
- type RadarrMovie
- type RadarrQualityProfile
- type RadarrQualityProfileItem
- type RadarrQualityRef
- type RadarrQueueStatus
- type RadarrRootFolder
- type RadarrSystemStatus
- type RadarrTag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
Auth returns a huma middleware that authenticates requests using:
- Sec-Fetch-Site: same-origin (browser)
- X-Api-Key header
- ?apikey= query parameter
func RegisterRoutes ¶
RegisterRoutes registers all Radarr v3 compatible endpoints on the given huma API instance.
Types ¶
type Config ¶
type Config struct {
DB *sql.DB
MovieService *movie.Service
QualityService *quality.Service
LibraryService *library.Service
QueueService *queue.Service
TagService *tag.Service
Scheduler *scheduler.Scheduler
}
Config holds the dependencies for the Radarr v3 compatibility layer.
type RadarrCommand ¶
type RadarrCommand struct {
Name string `json:"name"`
MovieIDs []int64 `json:"movieIds,omitempty"`
}
RadarrCommand is the request body for POST /api/v3/command.
type RadarrCommandResponse ¶
type RadarrCommandResponse struct {
ID int64 `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
Started string `json:"started"`
}
RadarrCommandResponse is the response for POST /api/v3/command.
type RadarrImage ¶
RadarrImage is a poster/fanart image entry.
type RadarrMovie ¶
type RadarrMovie struct {
ID int64 `json:"id"`
Title string `json:"title"`
OriginalTitle string `json:"originalTitle"`
SortTitle string `json:"sortTitle"`
TmdbID int `json:"tmdbId"`
ImdbID string `json:"imdbId"`
Year int `json:"year"`
Path string `json:"path"`
RootFolderPath string `json:"rootFolderPath"`
QualityProfileID int64 `json:"qualityProfileId"`
Monitored bool `json:"monitored"`
MinimumAvailability string `json:"minimumAvailability"`
IsAvailable bool `json:"isAvailable"`
HasFile bool `json:"hasFile"`
SizeOnDisk int64 `json:"sizeOnDisk"`
Status string `json:"status"`
Overview string `json:"overview"`
Images []RadarrImage `json:"images"`
Genres []string `json:"genres"`
Tags []int64 `json:"tags"`
Added string `json:"added"`
Ratings struct{} `json:"ratings"`
TitleSlug string `json:"titleSlug"`
Runtime int `json:"runtime"`
FolderName string `json:"folderName,omitempty"`
}
RadarrMovie is the Radarr v3 movie response shape.
type RadarrQualityProfile ¶
type RadarrQualityProfile struct {
ID int64 `json:"id"`
Name string `json:"name"`
UpgradeAllowed bool `json:"upgradeAllowed"`
Cutoff int `json:"cutoff"`
Items []RadarrQualityProfileItem `json:"items"`
}
RadarrQualityProfile is the Radarr v3 quality profile response shape.
type RadarrQualityProfileItem ¶
type RadarrQualityProfileItem struct {
Quality RadarrQualityRef `json:"quality"`
Allowed bool `json:"allowed"`
}
RadarrQualityProfileItem is a single allowed quality in a profile.
type RadarrQualityRef ¶
RadarrQualityRef is a quality ID + name pair.
type RadarrQueueStatus ¶
type RadarrQueueStatus struct {
TotalCount int `json:"totalCount"`
Count int `json:"count"`
UnknownCount int `json:"unknownCount"`
Errors bool `json:"errors"`
Warnings bool `json:"warnings"`
UnknownErrors bool `json:"unknownErrors"`
UnknownWarnings bool `json:"unknownWarnings"`
HasEnabledDownloader bool `json:"hasEnabledDownloader"` //nolint:revive
}
RadarrQueueStatus is the Radarr v3 queue/status response.
type RadarrRootFolder ¶
type RadarrRootFolder struct {
ID int64 `json:"id"`
Path string `json:"path"`
Accessible bool `json:"accessible"`
FreeSpace int64 `json:"freeSpace"`
}
RadarrRootFolder is the Radarr v3 root folder response.
type RadarrSystemStatus ¶
type RadarrSystemStatus struct {
AppName string `json:"appName"`
InstanceName string `json:"instanceName"`
Version string `json:"version"`
Branch string `json:"branch"`
Authentication string `json:"authentication"`
URLBase string `json:"urlBase"`
RuntimeName string `json:"runtimeName"`
RuntimeVersion string `json:"runtimeVersion"`
StartupPath string `json:"startupPath"`
AppData string `json:"appData"`
IsDocker bool `json:"isDocker"`
IsLinux bool `json:"isLinux"`
IsWindows bool `json:"isWindows"`
IsOsx bool `json:"isOsx"`
}
RadarrSystemStatus is the Radarr v3 system/status response.