rename limit option to items_limit; fix item_name_regex config example

This commit is contained in:
yggverse 2026-04-07 12:06:26 +03:00
parent 93f9bc4fee
commit f2b79b2a06
3 changed files with 4 additions and 4 deletions

View file

@ -16,8 +16,8 @@ sleep = 1
is_live = false
is_short = false
is_upcoming = false
# limit = 1
# name_regex = ".*"
# items_limit = 1
# item_name_regex = ".*"
# Channel item commands to apply (in order)

View file

@ -11,7 +11,7 @@ pub struct Channel {
pub is_live: bool,
pub is_short: bool,
pub is_upcoming: bool,
pub limit: Option<usize>,
pub items_limit: Option<usize>,
#[serde(with = "serde_regex")]
pub item_name_regex: Option<Regex>,
}

View file

@ -44,7 +44,7 @@ async fn main() {
let items = result.content.items;
debug!("received {:?} items to handle...", items.len());
for (i, item) in items.into_iter().enumerate() {
if channel.limit.is_some_and(|l| i > l) {
if channel.items_limit.is_some_and(|l| i > l) {
debug!("items limit for channel `{c}` reached at {i}; break.");
break;
}