[O] Use cached mime in get_thumb

This commit is contained in:
Azalea Gui
2023-02-23 14:09:30 -05:00
parent 55cf1ec4a5
commit 737e0826dd
+1 -1
View File
@@ -85,7 +85,7 @@ impl Generator {
Ok(fs::read(thumb)?)
}, |thumb| {
debug!("Generating thumbnail for {}\nto {}", file.display(), thumb.display());
let mime = self.mime_db.guess_mime_type().path(file).guess().mime_type().to_string();
let mime = self.get_mime(file)?;
if let Some(t) = self.thumbnailers.find(&*mime) {
t.gen(file.to_str().context("Orig file failed to convert to str")?,
thumb.to_str().context("New file failed to convert to str")?, 128)?;