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.
This commit is contained in:
Olivia Lee 2024-11-28 15:21:15 -08:00
parent 14b44064b3
commit 230192be1b
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9

View file

@ -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);
};