class

ArrJanitor::RadarrBackend

Inherits ArrJanitor::Backend < Reference < Object

Backend backed by the radarr shard. Wraps a Radarr::Client built from a Config::Backend and maps Radarr's models onto ArrJanitor's structs.

Mirrors SonarrBackend, adapted to Radarr's movie domain: the queue is movie-based (movieId), "released" means the movie is available, and the re-search command is MoviesSearch.

Network errors are not swallowed: any failed Radarr request raises (Radarr::ApiError) for the scheduler/janitor to log.

Constants

QUEUE_PAGE_SIZE = 100

Page size used when walking the (paged) queue endpoint.

Constructors

new(config : Config::Backend)
Source

Class methods

available_movie?(movie : Radarr::Model::MovieResource) : Bool

Whether movie is available, per Radarr's isAvailable flag (false when the flag is absent).

Source
build_download_client_info(resource : Radarr::Model::DownloadClientResource) : DownloadClientInfo

Builds a DownloadClientInfo from a Radarr download-client resource, reading host/port/useSsl/urlBase out of its fields.

Source
map_queue_item(record : Radarr::Model::QueueResource) : QueueItem

Maps a Radarr queue record onto a QueueItem.

Source

Instance methods

config

The Config::Backend this backend was built from.

Source
delete_and_blocklist(item : QueueItem) : Nil

Deletes the queue record, removing it from the download client and adding it to the blocklist.

Source
download_client_info(name : String) : DownloadClientInfo | Nil

Resolves the Radarr download client named name to connection details pulled from its fields array.

Source
interval_span

Poll interval between scans.

Source
name

Human-readable backend name (from config).

Source
queue

Fetches the full queue, following paging until every record is collected.

Source
released?(item : QueueItem) : Bool

True when the item's movie is available — Radarr's notion of a movie being released/available. Uses MovieResource#is_available (isAvailable), which Radarr computes from the movie's status, minimum-availability setting, and release dates — the direct analog of Sonarr's aired-episode check.

Source
search(item : QueueItem) : Nil

Issues a MoviesSearch command for the item's movie.

Source