class

ArrJanitor::Config::Backend

Inherits JSON::Serializable < YAML::Serializable < Reference < Object

A single Sonarr/Radarr instance to watch.

Constants

DEFAULT_INTERVAL = 20.minutes

Interval when none is configured.

INTERVAL_PATTERN = /\A(\d+)([mhd])\z/

<int> followed by a m/h/d unit.

Constructors

new(name : String, type : BackendType | Nil, url : String, api_key : String, interval : String | Nil = nil, extensions_filter : Array(String) = [] of String, download_clients : Array(DownloadClient) = [] of DownloadClient)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

api_key
Source
api_key=(api_key : String)
Source
download_clients
Source
download_clients=(download_clients : Array(DownloadClient))
Source
extensions_filter
Source
extensions_filter=(extensions_filter : Array(String))
Source
interval
Source
interval=(interval : String | Nil)
Source
interval_span

The poll interval as a Time::Span. Defaults to DEFAULT_INTERVAL when unset; raises Config::Error on a malformed value.

Source
matches_bad_extension?(filename : String) : Bool

Whether filename matches any entry in extensions_filter. An entry containing a glob metachar (*, ?, [) is matched as a glob against the basename (case-insensitive); otherwise it is treated as an extension matching files ending in .<entry> (case-insensitive; a leading . is tolerated).

Source
name
Source
name=(name : String)
Source
type

Parsed leniently so an unknown value surfaces as a validation error rather than a parse crash. nil means the raw value was invalid.

Source
type=(type : BackendType | Nil)

Parsed leniently so an unknown value surfaces as a validation error rather than a parse crash. nil means the raw value was invalid.

Source
url=(url : String)
Source

Nested types