diff --git a/yazi-plugin/preset/plugins/video.lua b/yazi-plugin/preset/plugins/video.lua index 453a03d6..0a5e61f8 100644 --- a/yazi-plugin/preset/plugins/video.lua +++ b/yazi-plugin/preset/plugins/video.lua @@ -31,7 +31,7 @@ function M:preload() return 1 end - local child = Command("ffmpegthumbnailer"):args({ + local child, code = Command("ffmpegthumbnailer"):args({ "-q", "6", "-c", @@ -47,6 +47,7 @@ function M:preload() }):spawn() if not child then + ya.err("spawn `ffmpegthumbnailer` command returns " .. tostring(code)) return 0 end diff --git a/yazi-plugin/src/isolate/peek.rs b/yazi-plugin/src/isolate/peek.rs index c87bf4be..456c04b8 100644 --- a/yazi-plugin/src/isolate/peek.rs +++ b/yazi-plugin/src/isolate/peek.rs @@ -21,7 +21,7 @@ pub fn peek(exec: &Exec, file: yazi_shared::fs::File, skip: usize) -> Cancellati lua.set_hook( HookTriggers::new().on_calls().on_returns().every_nth_instruction(2000), move |_, _| { - if ct1.is_cancelled() { Err("cancelled".into_lua_err()) } else { Ok(()) } + if ct1.is_cancelled() { Err("Peek task cancelled".into_lua_err()) } else { Ok(()) } }, ); @@ -46,7 +46,9 @@ pub fn peek(exec: &Exec, file: yazi_shared::fs::File, skip: usize) -> Cancellati }); if let Err(e) = result { - error!("{e}"); + if !e.to_string().contains("Peek task cancelled") { + error!("{e}"); + } } });