sorta works with links now

This commit is contained in:
Gabriel 2025-07-22 17:22:26 -04:00
parent c3b1afe267
commit b90e557a3d

View file

@ -49,6 +49,7 @@ fn process_children(children: &Vec<Item>) -> String {
result
}
fn has_image(children: &Vec<Item>) -> bool {
let mut result = false;
for c in children {
@ -125,6 +126,16 @@ fn get_media_source(children: &Vec<Item>) -> Option<String> {
fn media_content(item: &Item) -> Content{
match item {
Item::Link(_,children) => {
for c in children {
match c {
Item::Video(_) => {return media_content(c);}
Item::Audio(_) => {return media_content(c);}
_ => {}
}
}
Content::Ignore
}
Item::Audio(children) => {
match get_media_source(children) {
Some(s) => {