Skill: minerva-care/minerva-lidarr (version 1.0.0)

--- name: lidarr description: Interact with Lidarr (music/album manager) via its REST API. Use when searching for artists or albums, checking missing/wanted releases, triggering downloads, or monitoring queue status. Part of the *arr media management suite. --- # Lidarr Skill Lidarr is the *arr-suite manager for music. It monitors artists and albums, finds releases via indexers (Prowlarr), sends them to a download client, and organises them on disk. ## Connection Lidarr runs on Dozo at `http://localhost:8686`. ```bash LIDARR_URL="http://localhost:8686" LIDARR_KEY=$(cat /path/to/lidarr_api_key) ``` See `references/api.md` for all endpoints. ## Core Workflows ### Search and add an artist ```bash # 1. Look up artist (returns MusicBrainz results) curl -s "$LIDARR_URL/api/v1/artist/lookup?term=David+Bowie" \ -H "X-[REDACTED_SECRET]" | python3 -c " import sys,json results = json.load(sys.stdin) for a in results[:5]: print(a.get('artistName'), '| foreignArtistId:', a.get('foreignArtistId')) " # 2. Get quality/metadata profiles and root folders curl -s "$LIDARR_URL/api/v1/qualityprofile" -H "X-[REDACTED_SECRET]" curl -s "$LIDARR_URL/api/v1/metadataprofile" -H "X-[REDACTED_SECRET]" curl -s "$LIDARR_URL/api/v1/rootfolder" -H "X-[REDACTED_SECRET]" # 3. Add the artist curl -s -X POST "$LIDARR_URL/api/v1/artist" \ -H "X-[REDACTED_SECRET]" \ -H "Content-Type: application/json" \ -d '{"foreignArtistId":"<id>","artistName":"David Bowie","qualityProfileId":1,"metadataProfileId":1,"rootFolderPath":"/music","monitored":true,"addOptions":{"monitor":"all","searchForMissingAlbums":true}}' ``` ### Search and add an album ```bash # 1. Look up album curl -s "$LIDARR_URL/api/v1/album/lookup?term=Ziggy+Stardust" \ -H "X-[REDACTED_SECRET]" | python3 -c " import sys,json results = json.load(sys.stdin) for a in results[:5]: print(a.get('title'), '—', a.get('artist',{}).get('artistName'), '| foreignAlbumId:', a.get('foreignAlbumId')) " # 2. Add the album (artist must already be in Lidarr) curl -s -X POST "$LIDARR_URL/api/v1/album" \ -H "X-[REDACTED_SECRET]" \ -H "Content-Type: application/json" \ -d '{"foreignAlbumId":"<id>","monitored":true,"addOptions":{"searchForNewAlbum":true}}' ``` ### Check wanted/missing albums ```bash curl -s "$LIDARR_URL/api/v1/wanted/missing?pageSize=20" \ -H "X-[REDACTED_SECRET]" | python3 -c " import sys,json d = json.load(sys.stdin) for a in d.get('records',[]): print(a.get('title'), '—', a.get('artist',{}).get('artistName'), '(', a.get('releaseDate','?')[:4], ')') " ``` ### Trigger search for all missing albums ```bash curl -s -X POST "$LIDARR_URL/api/v1/command" \ -H "X-[REDACTED_SECRET]" \ -H "Content-Type: application/json" \ -d '{"name":"MissingAlbumSearch"}' ``` ### Check download queue ```bash curl -s "$LIDARR_URL/api/v1/queue" -H "X-[REDACTED_SECRET]" | python3 -c " import sys,json q = json.load(sys.stdin) for item in q.get('records',[]): print(item.get('title'), '|', item.get('status'), '|', item.get('timeleft','?')) " ``` ## Credentials Store API key at `~/clawd/credentials/lidarr_api_key` (single line, no newline). Load with: `LIDARR_KEY=$(cat /path/to/lidarr_api_key)`

path: references/api.md
content: # Lidarr API Reference

Base: `$LIDARR_URL/api/v1/`
Auth: Header `X-[REDACTED_SECRET]`

## Artists
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/artist` | List all monitored artists |
| GET | `/artist/{id}` | Get artist by ID |
| GET | `/artist/lookup?term=` | Search MusicBrainz for artists |
| POST | `/artist` | Add/monitor an artist |
| PUT | `/artist/{id}` | Update artist |
| DELETE | `/artist/{id}` | Remove artist |

## Albums
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/album` | List all albums |
| GET | `/album?artistId={id}` | List albums for an artist |
| GET | `/album/{id}` | Get album by ID |
| GET | `/album/lookup?term=` | Search MusicBrainz for albums |
| POST | `/album` | Add an album |
| PUT | `/album/{id}` | Update album |
| DELETE | `/album/{id}` | Remove album |

## Tracks
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/track?artistId={id}` | List tracks for an artist |
| GET | `/track?albumId={id}` | List tracks for an album |
| GET | `/track/{id}` | Get track by ID |
| GET | `/trackfile?artistId={id}` | List track files on disk |
| DELETE | `/trackfile/{id}` | Delete a track file |

## Queue
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/queue` | Current download queue |
| GET | `/queue?pageSize=20` | Queue with pagination |
| DELETE | `/queue/{id}` | Remove item from queue |
| DELETE | `/queue/{id}?blacklist=true` | Remove + blacklist |

## Wanted
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/wanted/missing` | Monitored but missing albums |
| GET | `/wanted/missing?pageSize=20` | Missing with pagination |
| GET | `/wanted/cutoff` | Albums below quality cutoff |

## Commands
POST `/command` with `{"name": "<CommandName>"}`:
- `MissingAlbumSearch` — search for all missing monitored albums
- `ArtistSearch` — search for specific artist (`{"name":"ArtistSearch","artistId":N}`)
- `AlbumSearch` — search for specific albums (`{"name":"AlbumSearch","albumIds":[N]}`)
- `RescanArtist` — rescan artist folder (`{"name":"RescanArtist","artistId":N}`)
- `RefreshArtist` — refresh artist metadata (`{"name":"RefreshArtist","artistId":N}`)
- `RescanFolders` — rescan all root folders

## Quality Profiles
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/qualityprofile` | List quality profiles |
| GET | `/qualityprofile/{id}` | Get profile by ID |

## Metadata Profiles
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/metadataprofile` | List metadata profiles |
| GET | `/metadataprofile/{id}` | Get profile by ID |

## Root Folders
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/rootfolder` | List configured root folders |

## Config & System
| Endpoint | Description |
|----------|-------------|
| GET `/system/status` | System info + version |
| GET `/history?pageSize=20` | Recent activity |
| GET `/downloadclient` | Configured download clients |
| GET `/indexer` | Configured indexers |

## Pagination
Add `?page=1&pageSize=20&sortKey=title&sortDir=asc` to list endpoints.

## Add Artist Payload Example
```json
{
  "foreignArtistId": "5441c29d-3602-4898-b1a1-b77fa23b8e50",
  "artistName": "David Bowie",
  "qualityProfileId": 1,
  "metadataProfileId": 1,
  "rootFolderPath": "/music",
  "monitored": true,
  "addOptions": {
    "monitor": "all",
    "searchForMissingAlbums": true
  }
}
```

## Add Album Payload Example
```json
{
  "foreignAlbumId": "9a1c5b83-9b4a-47e6-b7bf-2a2a83bc0a37",
  "monitored": true,
  "addOptions": {
    "searchForNewAlbum": true
  }
}
```


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)