ArrTop::SonarrBackend
Inherits ArrTop::Backend < Reference < Object
Backend backed by the sonarr shard. Wraps a Sonarr::Client and maps
Sonarr's queue records onto normalized QueueRows. The queue is
episode-based, so media_kind is :episode and dest_folder comes from the
embedded series' path.
Network errors are not swallowed: a failed Sonarr request raises
Sonarr::ApiError for the caller (the Poller) to handle.
Constants
Page size used when walking the (paged) queue endpoint.
Constructors
Class methods
Builds the media-column display name for an episode: the series title with
an SxxEyy code appended when both season and episode are known (e.g.
"The Show S02E03"). Falls back to just the series title (or nil) when
the season/episode isn't known. Pure, so it's unit-testable.
Pure mapping seam: turns a Sonarr queue record into a QueueRow.
Converts the shard's Float64? byte counts to Int64 (nil → 0).
True when the tracked download status signals a warning or error.
Instance methods
Fetches the full queue, following paging until every record is collected.
include_series: true so series.path is available for dest_folder, and
include_episode: true so record.episode (hence episode_number) is
populated — without it every season-pack row's episode is nil and the
per-episode file matching silently falls back to the folder's newest file,
making all episodes show the same (wrong) percentage.