From effede9da1e2c5285bcac86dddffc8b38e05128a Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 10 Apr 2024 15:30:42 -0500 Subject: [PATCH] fix video thumbs? --- src/rust/slide_model.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/rust/slide_model.rs b/src/rust/slide_model.rs index c9502b5..7c46cd2 100644 --- a/src/rust/slide_model.rs +++ b/src/rust/slide_model.rs @@ -333,17 +333,21 @@ impl slide_model::SlideModel { slide.video_thumbnail = screenshot_string; let runtime = tokio::runtime::Runtime::new().unwrap(); runtime.spawn(async move { - let video = ffmpeg::bg_from_video(&path, &screenshot).await; - let res = thread.queue(move |mut slide_model| + let result = ffmpeg::bg_from_video(&path, &screenshot).await; + match result { + Ok(_o) => debug!("Success making video background!"), + Err(error) => error!(?error, "Error making video background") + }; + let result = thread.queue(move |mut slide_model| slide_model.as_mut().data_changed( &model_index, &model_index, &vector_roles, ) ); - match res { - Ok(o) => debug!("success making video background!"), - Err(error) => error!(?error, "Error making video background!") + match result { + Ok(o) => debug!("Success in creating qt_thread"), + Err(error) => error!(?error, "Error in creating qt_thread") } }); }