This commit is contained in:
parent
77daa03db6
commit
a56ff6a022
4 changed files with 15 additions and 26 deletions
|
|
@ -37,9 +37,10 @@ impl From<&Video> for Value {
|
|||
|
||||
impl From<PathBuf> for Video {
|
||||
fn from(value: PathBuf) -> Self {
|
||||
let title: String = value.file_name().map_or_else(|| "Video".into(), |filename| {
|
||||
filename.to_str().unwrap_or("Video").into()
|
||||
});
|
||||
let title: String = value.file_name().map_or_else(
|
||||
|| "Video".into(),
|
||||
|filename| filename.to_str().unwrap_or("Video").into(),
|
||||
);
|
||||
Self {
|
||||
title,
|
||||
path: value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue