From 24c4a0c8d486abb54ca2028f1732d77a59c5c0cd Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Thu, 23 Feb 2023 13:41:04 -0500 Subject: [PATCH] [+] Thumbnailer check mime type --- backend/src/thumbnailer.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/thumbnailer.rs b/backend/src/thumbnailer.rs index d9c7f08..cdbac55 100644 --- a/backend/src/thumbnailer.rs +++ b/backend/src/thumbnailer.rs @@ -35,4 +35,9 @@ impl Thumbnailer { Ok(t) } + + /// Check if this thumbnailer should run on a specific mime type + pub fn check(&self, mime: &str) -> bool { + self.mime_type.contains(mime) + } }