parent
bcb0d8738a
commit
198994a99c
5 changed files with 24 additions and 16 deletions
|
@ -22,7 +22,11 @@ pub async fn video_file(v: &str, library: &State<Library>) -> Option<DataRespons
|
|||
"video/webm"
|
||||
};
|
||||
|
||||
return Some(DataResponse::new(buf, content_type, Some(60 * 60 * 24 * 3)));
|
||||
return Some(DataResponse::new(
|
||||
buf,
|
||||
content_type.to_string(),
|
||||
Some(60 * 60 * 24 * 3),
|
||||
));
|
||||
}
|
||||
|
||||
None
|
||||
|
@ -37,7 +41,11 @@ pub async fn video_thumbnail(v: &str, library: &State<Library>) -> Option<DataRe
|
|||
};
|
||||
|
||||
if let Some(data) = library.get_thumbnail(&video).await {
|
||||
return Some(DataResponse::new(data, "image/png", Some(60 * 60 * 24 * 3)));
|
||||
return Some(DataResponse::new(
|
||||
data,
|
||||
"image/png".to_string(),
|
||||
Some(60 * 60 * 24 * 3),
|
||||
));
|
||||
}
|
||||
|
||||
None
|
||||
|
@ -47,7 +55,7 @@ pub async fn video_thumbnail(v: &str, library: &State<Library>) -> Option<DataRe
|
|||
pub async fn fav_icon() -> DataResponse {
|
||||
DataResponse::new(
|
||||
include_bytes!("../../src/icon.png").to_vec(),
|
||||
"image/png",
|
||||
"image/png".to_string(),
|
||||
Some(60 * 60 * 24 * 30),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue