fix item_name_regex handler

This commit is contained in:
yggverse 2026-04-07 12:15:53 +03:00
parent f2b79b2a06
commit 588ad6b9dd
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -48,7 +48,7 @@ async fn main() {
debug!("items limit for channel `{c}` reached at {i}; break.");
break;
}
if !channel
if channel
.item_name_regex
.as_ref()
.is_some_and(|regex| regex.is_match(&item.name))