a43fa09a04
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
1.6 KiB
Go
49 lines
1.6 KiB
Go
// Package lidarr is a typed HTTP client for Lidarr's v1 API. It is the
|
|
// only place in the codebase that knows about Lidarr's wire format.
|
|
// Callers receive value structs, never raw JSON.
|
|
package lidarr
|
|
|
|
// LookupResult is the normalized shape returned by Lookup{Artist,Album,Track}.
|
|
// It is what we store on the request row (via the user's request) and
|
|
// what /api/lidarr/search returns to the SPA.
|
|
type LookupResult struct {
|
|
MBID string // foreignArtistId / foreignAlbumId / foreignTrackId
|
|
Name string // artist name; album/track returns Title here too
|
|
Secondary string // genre + album count for artist; year for album; album for track
|
|
ImageURL string // cover-art URL Lidarr surfaced (may be empty)
|
|
}
|
|
|
|
// QualityProfile is the dropdown choice in /admin/integrations.
|
|
type QualityProfile struct {
|
|
ID int
|
|
Name string
|
|
}
|
|
|
|
// RootFolder is the dropdown choice in /admin/integrations.
|
|
type RootFolder struct {
|
|
Path string
|
|
Accessible bool
|
|
FreeSpace int64
|
|
}
|
|
|
|
// AddArtistParams are the fields Lidarr requires on POST /api/v1/artist.
|
|
type AddArtistParams struct {
|
|
ForeignArtistID string
|
|
QualityProfileID int
|
|
RootFolderPath string
|
|
MonitorAll bool // true => monitor="all"; false => "future"
|
|
}
|
|
|
|
// AddAlbumParams are the fields Lidarr requires on POST /api/v1/album.
|
|
type AddAlbumParams struct {
|
|
ForeignAlbumID string
|
|
ForeignArtistID string // Lidarr requires the artist's foreign id too
|
|
QualityProfileID int
|
|
RootFolderPath string
|
|
}
|
|
|
|
// PingResult is the response shape from GET /api/v1/system/status.
|
|
type PingResult struct {
|
|
Version string
|
|
}
|