mirror of
https://codeberg.org/YGGverse/ytd.git
synced 2026-04-08 12:55:32 +00:00
fix item_name_regex handler
This commit is contained in:
parent
f2b79b2a06
commit
588ad6b9dd
2 changed files with 2 additions and 1 deletions
|
|
@ -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>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue