From ec9e21f3189b1295c7c882f4664a729a1bbfcfc8 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 24 Jan 2025 15:19:06 -0600 Subject: [PATCH] Add danger-dummy-mode blurhash implementation --- src/blurhash.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/blurhash.rs b/src/blurhash.rs index 5f6246c..ec6570d 100644 --- a/src/blurhash.rs +++ b/src/blurhash.rs @@ -26,6 +26,10 @@ pub(crate) async fn generate( where S: Store + 'static, { + if state.config.server.danger_dummy_mode { + return Ok(String::from("LGF5?xYk^6AAAAAAAAAAAAAAAAAA")); + } + let permit = crate::process_semaphore().acquire().await?; let blurhash = do_generate(state, hash, original_details)