making the text in the library smarter

This commit is contained in:
Chris Cochrun 2025-03-20 07:16:21 -05:00
parent 40065d2c5a
commit 9b9c337c1b
8 changed files with 65 additions and 22 deletions

View file

@ -58,6 +58,17 @@ impl Content for Video {
None
}
}
fn subtext(&self) -> String {
if self.path.exists() {
self.path
.file_name()
.map(|f| f.to_string_lossy().to_string())
.unwrap_or("Missing video".into())
} else {
"Missing video".into()
}
}
}
impl From<Value> for Video {