From 4897c90ed7b44df499b6a9147d25c6e77bee11c7 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 3 Mar 2024 11:11:43 -0600 Subject: [PATCH] Add blurhash cleanup for sled --- src/repo/sled.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/repo/sled.rs b/src/repo/sled.rs index f16b01b..e99ded0 100644 --- a/src/repo/sled.rs +++ b/src/repo/sled.rs @@ -1411,6 +1411,7 @@ impl HashRepo for SledRepo { let hash_identifiers = self.hash_identifiers.clone(); let hash_motion_identifiers = self.hash_motion_identifiers.clone(); let hash_variant_identifiers = self.hash_variant_identifiers.clone(); + let hash_blurhashes = self.hash_blurhashes.clone(); let hash2 = hash.clone(); let variant_keys = b!(self.hash_variant_identifiers, { @@ -1430,6 +1431,7 @@ impl HashRepo for SledRepo { &hash_identifiers, &hash_motion_identifiers, &hash_variant_identifiers, + &hash_blurhashes, ) .transaction( |( @@ -1438,6 +1440,7 @@ impl HashRepo for SledRepo { hash_identifiers, hash_motion_identifiers, hash_variant_identifiers, + hash_blurhashes, )| { if let Some(value) = hashes.remove(&hash)? { hashes_inverse.remove(value)?; @@ -1450,6 +1453,8 @@ impl HashRepo for SledRepo { hash_variant_identifiers.remove(key)?; } + hash_blurhashes.remove(&hash)?; + Ok(()) }, )