From a6f76400f8294498efc792f65016a4cf4c6764e5 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Mon, 20 Nov 2023 12:02:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20disable=20`.djvu`=20temporarily=20to=20p?= =?UTF-8?q?revent=20=C3=9Cberzug++=20from=20freezing,=20close=20#379?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yazi-adaptor/src/ueberzug.rs | 2 ++ yazi-shared/src/mime.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/yazi-adaptor/src/ueberzug.rs b/yazi-adaptor/src/ueberzug.rs index c7b414f2..dce59f17 100644 --- a/yazi-adaptor/src/ueberzug.rs +++ b/yazi-adaptor/src/ueberzug.rs @@ -71,8 +71,10 @@ impl Ueberzug { path.to_string_lossy(), "\n" ); + debug!("ueberzug command: {}", s); stdin.write_all(s.as_bytes()).await?; } else { + debug!("ueberzug command: remove"); stdin .write_all(format!(r#"{{"action":"remove","identifier":"yazi"}}{}"#, "\n").as_bytes()) .await?; diff --git a/yazi-shared/src/mime.rs b/yazi-shared/src/mime.rs index b4add0cb..2a26c5a7 100644 --- a/yazi-shared/src/mime.rs +++ b/yazi-shared/src/mime.rs @@ -24,7 +24,7 @@ impl MimeKind { || s.ends_with("/x-wine-extension-ini") { Self::Text - } else if s.starts_with("image/") { + } else if s.starts_with("image/") && s != "image/vnd.djvu" { Self::Image } else if s.starts_with("video/") { Self::Video