video thumbnail generation
still not perfect actually cache thumbnail simplify media id
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user