From 230192be1b595d7a8cb29d221d9345479100d4fe Mon Sep 17 00:00:00 2001 From: Olivia Lee Date: Thu, 28 Nov 2024 15:21:15 -0800 Subject: [PATCH] skip thumbnails with only one nonzero dimension in all_file_metadata Previously we were only skipping thumbnails that had both dimensions nonzero. I think the assumption was that only the dimensions allowed by services::media::thumbnail_properties would be used. This is not the case because we have used arbitrary thumbnail dimensions when requesting remote thumbnails. --- src/database/key_value/media.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/key_value/media.rs b/src/database/key_value/media.rs index 8f7ca2d7..a7272042 100644 --- a/src/database/key_value/media.rs +++ b/src/database/key_value/media.rs @@ -208,7 +208,7 @@ impl service::media::Data for KeyValueDatabase { let key = MediaFileKey::new(key); let parts = MediaFileKeyParts::try_from(&key)?; - if parts.width != 0 && parts.height != 0 { + if parts.width != 0 || parts.height != 0 { // Skip thumbnails return Ok(None); };