Skip to content

Bazarr Module API Explanation

The Bazarr module monitors the library size and missing subtitle files status for movies and television series.


API Execution Logic

The module locates the service definition matching the identifier bazarr. The API URL is resolved, and the BAZARR_API_KEY is loaded from the environment variables.

Request Execution

A fetch request is sent to the /api/badges path under the target API URL. The API key is transmitted via the X-API-Key header. A timeout of 5 seconds is attached to the request.

Data Parsing

Upon success, the API returns a JSON payload containing badge metrics. The module extracts:

  • episodes: The total count of series episodes (primary metric).
  • movies: The total count of movies (secondary metric).

Caching Strategy

Results are cached in memory for 60 seconds (TTL) and allowed to serve stale data for up to 300 seconds if the backend becomes unreachable.