An RSS auto-downloading rule, as returned by GET rss/rules (values of the
{ruleName => RssRule} map) and accepted by POST rss/setRule (serialized
into the ruleDef form field).
Round-trips cleanly: parse rss/rules, mutate a rule, and #to_json it
back into set_rule. Every field is nilable/defaulted so partial or
version-drifted payloads parse, and unknown keys survive via
JSON::Serializable::Unmapped.
add_paused and torrent_content_layout are tri-state: qBittorrent
sends null to mean "use the global default", distinct from an explicit
true/false or layout string. They stay nil when absent or null.
Constructors
new(enabled :
Bool |
Nil = nil, must_contain :
String |
Nil = nil, must_not_contain :
String |
Nil = nil, use_regex :
Bool |
Nil = nil, episode_filter :
String |
Nil = nil, smart_filter :
Bool |
Nil = nil, previously_matched_episodes :
Array(
String) |
Nil = nil, affected_feeds :
Array(
String) |
Nil = nil, ignore_days :
Int32 |
Nil = nil, last_match :
String |
Nil = nil, add_paused :
Bool |
Nil = nil, assigned_category :
String |
Nil = nil, save_path :
String |
Nil = nil, torrent_content_layout :
String |
Nil = nil, torrent_params :
JSON::Any |
Nil = nil)
SourceInstance methods
add_paused
Tri-state add-paused: true/false, or nil/null for the global default.
Sourceadd_paused=(add_paused :
Bool |
Nil)
Tri-state add-paused: true/false, or nil/null for the global default.
Sourceaffected_feeds
Feed URLs this rule applies to.
SourceFeed URLs this rule applies to.
Sourceassigned_category
Category assigned to torrents added by this rule.
Sourceassigned_category=(assigned_category :
String |
Nil)
Category assigned to torrents added by this rule.
Sourceenabled
Whether the rule is active.
Sourceenabled=(enabled :
Bool |
Nil)
Whether the rule is active.
Sourceepisode_filter
Episode filter expression, e.g. "1x2-;".
Sourceepisode_filter=(episode_filter :
String |
Nil)
Episode filter expression, e.g. "1x2-;".
Sourceignore_days
Ignore subsequent matches for this many days after a match.
Sourceignore_days=(ignore_days :
Int32 |
Nil)
Ignore subsequent matches for this many days after a match.
Sourcelast_match
Datetime string of the last match, e.g. "2021-01-01T12:00:00".
Sourcelast_match=(last_match :
String |
Nil)
Datetime string of the last match, e.g. "2021-01-01T12:00:00".
Sourcemust_contain
Substring/regex the article title must contain to match.
Sourcemust_contain=(must_contain :
String |
Nil)
Substring/regex the article title must contain to match.
Sourcemust_not_contain
Substring/regex the article title must NOT contain.
Sourcemust_not_contain=(must_not_contain :
String |
Nil)
Substring/regex the article title must NOT contain.
Sourcepreviously_matched_episodes
Episodes already matched by the smart filter.
Sourcepreviously_matched_episodes=(previously_matched_episodes :
Array(
String) |
Nil)
Episodes already matched by the smart filter.
Sourcesave_path
Save path for torrents added by this rule.
Sourcesave_path=(save_path :
String |
Nil)
Save path for torrents added by this rule.
Sourcesmart_filter
Enable smart episode filtering (skip already-downloaded episodes).
Sourcesmart_filter=(smart_filter :
Bool |
Nil)
Enable smart episode filtering (skip already-downloaded episodes).
Sourcetorrent_content_layout
Content layout for added torrents (Original/Subfolder/NoSubfolder),
or nil/null for the global default [5.x].
Sourcetorrent_content_layout=(torrent_content_layout :
String |
Nil)
Content layout for added torrents (Original/Subfolder/NoSubfolder),
or nil/null for the global default [5.x].
Sourcetorrent_params
Structured torrent add-parameters object [5.x newer]. Kept as JSON::Any
since its shape mirrors the (large, drifting) add-torrent params.
Sourcetorrent_params=(torrent_params :
JSON::Any |
Nil)
Structured torrent add-parameters object [5.x newer]. Kept as JSON::Any
since its shape mirrors the (large, drifting) add-torrent params.
Sourceuse_regex
Treat mustContain/mustNotContain as regular expressions.
Sourceuse_regex=(use_regex :
Bool |
Nil)
Treat mustContain/mustNotContain as regular expressions.
Source