video thumbnail generation

still not perfect

actually cache thumbnail
simplify media id
This commit is contained in:
2025-07-04 16:00:22 -04:00
parent 201de5796e
commit ccbea45809
9 changed files with 102 additions and 70 deletions

View File

@@ -12,12 +12,11 @@ pub fn MediaItem(props: MediaItemProps) -> Element {
if let Some(item) = props.item {
let mtype = item.media_type().as_str_name();
let filename = item.file_name;
let id = item.media_id.unwrap().value;
let src = format!("{HOST}/m/thumb/{id}");
let id = item.id.unwrap().value;
let thumb = item.thumb_url;
return rsx! {
a { class: "mediaItem", href: "{HOST}/m/{id}", target: "_blank",
img { src }
img { src: "{HOST}{thumb}" }
span { class: "info",
span { class: "name", "{filename}" }
span { class: "details",