ArrTop::Config
Inherits JSON::Serializable < YAML::Serializable < Reference < Object
Application configuration: the list of Sonarr/Radarr backends arrtop polls. Parses from either YAML or JSON (the same shape in both), so a config file can be authored in whichever the operator prefers.
Constants
Default TUI refresh interval when refresh is unset/blank/unparseable.
Constructors
Loads a config from path. YAML wins: .yml/.yaml parse as YAML,
.json as JSON, and anything else tries YAML first then JSON.
Instance methods
Optional download clients arrtop queries for exact per-episode sizes. nil
/ absent ⇒ the feature is off and behaviour is identical to before (each
season-pack episode is estimated as pack_total / episode_count). When
present, every entry is validated by #validation_errors.
Optional download clients arrtop queries for exact per-episode sizes. nil
/ absent ⇒ the feature is off and behaviour is identical to before (each
season-pack episode is estimated as pack_total / episode_count). When
present, every entry is validated by #validation_errors.
How often the TUI redraws, as <int>s / <int>ms / a bare integer
(seconds). nil (unset) means the default; see #refresh_span. Validated
by #validation_errors when set.
How often the TUI redraws, as <int>s / <int>ms / a bare integer
(seconds). nil (unset) means the default; see #refresh_span. Validated
by #validation_errors when set.
The refresh interval as a Time::Span: the parsed refresh value, or
DEFAULT_REFRESH (2s) otherwise. (An unparseable value is also reported by
#validation_errors.)
Validates the config, raising Config::Error listing all problems.
Returns self when valid.