Documentation ¶
Index ¶
- type AddAlbumInput
- type AddAlbumInputRelease
- type Album
- type AlbumAddOptions
- type AlbumType
- type Artist
- type ArtistAddOptions
- type CommandRequest
- type CommandResponse
- type Lidarr
- func (l *Lidarr) AddAlbum(album *AddAlbumInput) (*Album, error)
- func (l *Lidarr) AddArtist(artist *Artist) (*Artist, error)
- func (l *Lidarr) AddQualityProfile(profile *QualityProfile) (int64, error)
- func (l *Lidarr) AddTag(label string) (int, error)
- func (l *Lidarr) GetAlbum(mbID string) ([]*Album, error)
- func (l *Lidarr) GetAlbumByID(albumID int64) (*Album, error)
- func (l *Lidarr) GetArtist(mbID string) ([]*Artist, error)
- func (l *Lidarr) GetArtistByID(artistID int64) (*Artist, error)
- func (l *Lidarr) GetCommands() ([]*CommandResponse, error)
- func (l *Lidarr) GetMetadataProfiles() ([]*MetadataProfile, error)
- func (l *Lidarr) GetQualityDefinition() ([]*QualityDefinition, error)
- func (l *Lidarr) GetQualityProfiles() ([]*QualityProfile, error)
- func (l *Lidarr) GetQueue(maxRecords int) (*Queue, error)
- func (l *Lidarr) GetRootFolders() ([]*RootFolder, error)
- func (l *Lidarr) GetSystemStatus() (*SystemStatus, error)
- func (l *Lidarr) GetTags() ([]*starr.Tag, error)
- func (l *Lidarr) SendCommand(cmd *CommandRequest) (*CommandResponse, error)
- func (l *Lidarr) UpdateAlbum(albumID int64, album *Album) (*Album, error)
- func (l *Lidarr) UpdateArtist(artist *Artist) (*Artist, error)
- func (l *Lidarr) UpdateQualityProfile(profile *QualityProfile) error
- func (l *Lidarr) UpdateTag(tagID int, label string) (int, error)
- type Media
- type MetadataProfile
- type QualityDefinition
- type QualityProfile
- type Queue
- type QueueRecord
- type Release
- type ReleaseStatus
- type RootFolder
- type Statistics
- type SystemStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAlbumInput ¶
type AddAlbumInput struct { ForeignAlbumID string `json:"foreignAlbumId"` Monitored bool `json:"monitored"` Releases []*AddAlbumInputRelease `json:"releases"` AddOptions *AlbumAddOptions `json:"addOptions"` Artist *Artist `json:"artist"` }
AddAlbumInput is currently unknown.
type AddAlbumInputRelease ¶
type AddAlbumInputRelease struct { ForeignReleaseID string `json:"foreignReleaseId"` Title string `json:"title"` Media []*Media `json:"media"` Monitored bool `json:"monitored"` }
AddAlbumInputRelease is part of AddAlbumInput.
type Album ¶
type Album struct { ID int64 `json:"id,omitempty"` Title string `json:"title"` Disambiguation string `json:"disambiguation"` Overview string `json:"overview"` ArtistID int64 `json:"artistId"` ForeignAlbumID string `json:"foreignAlbumId"` ProfileID int64 `json:"profileId"` Duration int `json:"duration"` AlbumType string `json:"albumType"` SecondaryTypes []interface{} `json:"secondaryTypes"` MediumCount int `json:"mediumCount"` Ratings *starr.Ratings `json:"ratings"` ReleaseDate time.Time `json:"releaseDate"` Releases []*Release `json:"releases"` Genres []interface{} `json:"genres"` Media []*Media `json:"media"` Artist *Artist `json:"artist"` Links []*starr.Link `json:"links"` Images []*starr.Image `json:"images"` Statistics *Statistics `json:"statistics"` RemoteCover string `json:"remoteCover,omitempty"` AddOptions *AlbumAddOptions `json:"addOptions,omitempty"` Monitored bool `json:"monitored"` AnyReleaseOk bool `json:"anyReleaseOk"` }
Album is the /api/v1/album endpoint.
type AlbumAddOptions ¶
type AlbumAddOptions struct {
SearchForNewAlbum bool `json:"searchForNewAlbum,omitempty"`
}
AlbumAddOptions is part of an Album.
type Artist ¶
type Artist struct { ID int64 `json:"id"` Status string `json:"status,omitempty"` LastInfoSync time.Time `json:"lastInfoSync,omitempty"` ArtistName string `json:"artistName,omitempty"` ForeignArtistID string `json:"foreignArtistId,omitempty"` TadbID int64 `json:"tadbId,omitempty"` DiscogsID int64 `json:"discogsId,omitempty"` QualityProfileID int64 `json:"qualityProfileId,omitempty"` MetadataProfileID int64 `json:"metadataProfileId,omitempty"` Overview string `json:"overview,omitempty"` ArtistType string `json:"artistType,omitempty"` Disambiguation string `json:"disambiguation,omitempty"` RootFolderPath string `json:"rootFolderPath,omitempty"` Path string `json:"path,omitempty"` CleanName string `json:"cleanName,omitempty"` SortName string `json:"sortName,omitempty"` Links []*starr.Link `json:"links,omitempty"` Images []*starr.Image `json:"images,omitempty"` Genres []string `json:"genres,omitempty"` Tags []int `json:"tags,omitempty"` Added time.Time `json:"added,omitempty"` Ratings *starr.Ratings `json:"ratings,omitempty"` Statistics *Statistics `json:"statistics,omitempty"` LastAlbum *Album `json:"lastAlbum,omitempty"` NextAlbum *Album `json:"nextAlbum,omitempty"` AddOptions *ArtistAddOptions `json:"addOptions,omitempty"` AlbumFolder bool `json:"albumFolder,omitempty"` Monitored bool `json:"monitored"` Ended bool `json:"ended,omitempty"` }
Artist represents the /api/v1/artist endpoint, and it's part of an Album.
type ArtistAddOptions ¶
type ArtistAddOptions struct { Monitor string `json:"monitor,omitempty"` Monitored bool `json:"monitored,omitempty"` SearchForMissingAlbums bool `json:"searchForMissingAlbums,omitempty"` }
ArtistAddOptions is part of an artist and an album.
type CommandRequest ¶ added in v0.9.10
type CommandRequest struct { Name string `json:"name"` AlbumIDs []int64 `json:"albumIds,omitempty"` AlbumID int64 `json:"albumId,omitempty"` }
CommandReqyest goes into the /api/v1/command endpoint. This was created from the search command and may not support other commands yet.
type CommandResponse ¶ added in v0.9.10
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/v1/command endpoint.
type Lidarr ¶
Lidarr contains all the methods to interact with a Lidarr server.
func (*Lidarr) AddAlbum ¶
func (l *Lidarr) AddAlbum(album *AddAlbumInput) (*Album, error)
AddAlbum adds a new album to Lidarr, and probably does not yet work.
func (*Lidarr) AddQualityProfile ¶ added in v0.9.11
func (l *Lidarr) AddQualityProfile(profile *QualityProfile) (int64, error)
AddQualityProfile updates a quality profile in place.
func (*Lidarr) GetAlbum ¶
GetAlbum returns an album or all albums if mbID is "" (empty). mbID is the music brainz UUID for a "release-group".
func (*Lidarr) GetAlbumByID ¶
GetAlbumByID returns an album by DB ID.
func (*Lidarr) GetArtistByID ¶
GetArtistByID returns an artist from an ID.
func (*Lidarr) GetCommands ¶ added in v0.9.10
func (l *Lidarr) GetCommands() ([]*CommandResponse, error)
GetCommands returns all available Lidarr commands.
func (*Lidarr) GetMetadataProfiles ¶
func (l *Lidarr) GetMetadataProfiles() ([]*MetadataProfile, error)
GetMetadataProfiles returns the metadata profiles.
func (*Lidarr) GetQualityDefinition ¶
func (l *Lidarr) GetQualityDefinition() ([]*QualityDefinition, error)
GetQualityDefinition returns the Quality Definitions.
func (*Lidarr) GetQualityProfiles ¶
func (l *Lidarr) GetQualityProfiles() ([]*QualityProfile, error)
GetQualityProfiles returns the quality profiles.
func (*Lidarr) GetRootFolders ¶
func (l *Lidarr) GetRootFolders() ([]*RootFolder, error)
GetRootFolders returns all configured root folders.
func (*Lidarr) GetSystemStatus ¶
func (l *Lidarr) GetSystemStatus() (*SystemStatus, error)
GetSystemStatus returns system status.
func (*Lidarr) SendCommand ¶ added in v0.9.10
func (l *Lidarr) SendCommand(cmd *CommandRequest) (*CommandResponse, error)
SendCommand sends a command to Lidarr.
func (*Lidarr) UpdateAlbum ¶
UpdateAlbum updates an album in place; the output of this is currently unknown!!!!
func (*Lidarr) UpdateArtist ¶
UpdateArtist updates an artist in place.
func (*Lidarr) UpdateQualityProfile ¶ added in v0.9.11
func (l *Lidarr) UpdateQualityProfile(profile *QualityProfile) error
UpdateQualityProfile updates a quality profile in place.
type Media ¶
type Media struct { MediumNumber int64 `json:"mediumNumber"` MediumName string `json:"mediumName"` MediumFormat string `json:"mediumFormat"` }
Media is part of an Album.
type MetadataProfile ¶
type MetadataProfile struct { Name string `json:"name"` ID int64 `json:"id"` PrimaryAlbumTypes []*AlbumType `json:"primaryAlbumTypes"` SecondaryAlbumTypes []*AlbumType `json:"secondaryAlbumTypes"` ReleaseStatuses []*ReleaseStatus `json:"releaseStatuses"` }
MetadataProfile is the /api/v1/metadataprofile endpoint.
type QualityDefinition ¶
type QualityDefinition struct { ID int64 `json:"id"` Quality *starr.Value `json:"quality"` Title string `json:"title"` Weight int64 `json:"weight"` MinSize float64 `json:"minSize"` MaxSize float64 `json:"maxSize,omitempty"` }
QualityDefinition is the /api/v1/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"` }
QualityProfile is the /api/v1/qualityprofile endpoint.
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/v1/queue endpoint.
type QueueRecord ¶ added in v0.10.4
type QueueRecord struct { ArtistID int64 `json:"artistId"` AlbumID int64 `json:"albumId"` Quality *starr.Quality `json:"quality"` 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"` 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"` DownloadForced bool `json:"downloadForced"` ID int64 `json:"id"` ErrorMessage string `json:"errorMessage"` }
QueueRecord represents the records returns by the /api/v1/queue endpoint.
type Release ¶
type Release struct { ID int64 `json:"id"` AlbumID int64 `json:"albumId"` ForeignReleaseID string `json:"foreignReleaseId"` Title string `json:"title"` Status string `json:"status"` Duration int `json:"duration"` TrackCount int `json:"trackCount"` Media []*Media `json:"media"` MediumCount int `json:"mediumCount"` Disambiguation string `json:"disambiguation"` Country []string `json:"country"` Label []string `json:"label"` Format string `json:"format"` Monitored bool `json:"monitored"` }
Release is part of an Album.
type ReleaseStatus ¶
type ReleaseStatus struct { ReleaseStatus *starr.Value `json:"releaseStatus"` Allowed bool `json:"allowed"` }
ReleaseStatus is part of MetadataProfile.
type RootFolder ¶
type RootFolder struct { ID int64 `json:"id"` Path string `json:"path"` FreeSpace int64 `json:"freeSpace"` TotalSpace int64 `json:"totalSpace"` UnmappedFolders []*starr.Path `json:"unmappedFolders"` }
RootFolder is the /api/v1/rootfolder endpoint.
type Statistics ¶
type Statistics struct { AlbumCount int `json:"albumCount,omitempty"` TrackFileCount int `json:"trackFileCount"` TrackCount int `json:"trackCount"` TotalTrackCount int `json:"totalTrackCount"` SizeOnDisk int `json:"sizeOnDisk"` PercentOfTracks float64 `json:"percentOfTracks"` }
Statistics is part of Artist.
type SystemStatus ¶
type SystemStatus struct { Version string `json:"version"` BuildTime time.Time `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"` IsDocker bool `json:"isDocker"` Mode string `json:"mode"` Branch string `json:"branch"` Authentication string `json:"authentication"` SqliteVersion string `json:"sqliteVersion"` MigrationVersion int64 `json:"migrationVersion"` URLBase string `json:"urlBase"` RuntimeVersion string `json:"runtimeVersion"` RuntimeName string `json:"runtimeName"` StartTime time.Time `json:"startTime"` }
SystemStatus is the /api/v1/system/status endpoint.