Skip to content

Lidarr Module API Explanation

The Lidarr module tracks music library size and missing audio release queues.


API Execution Logic

The module locates the service matching the identifier lidarr. The API key is loaded from the LIDARR_API_KEY environment variable and mapped to the X-Api-Key header.

Parallel Request Execution

To retrieve both the catalog size and missing item queues, the backend executes two parallel HTTP GET requests using Promise.all:

  1. Catalog Query: A request is sent to /api/v1/artist to retrieve the list of all artists in the library.
  2. Missing Queue Query: A request is sent to /api/v1/wanted/missing to retrieve missing release records.

Data Parsing

  • Primary Metric: The total count of artists defined in the library (calculated as the length of the artist array).
  • Secondary Metric: The count of missing release items (calculated as the length of the records array returned from the wanted endpoint).

Caching Strategy

The results are cached for 60 seconds (TTL) with a maximum stale window of 300 seconds. A timeout of 5 seconds is enforced per request.