diff --git a/src/main.rs b/src/main.rs index 3e3787e..83942bd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,6 +45,10 @@ async fn get_images(query: &str) -> Vec { } } + // Sort and deduplicate + matching_images.sort_by(|a, b| b.id.cmp(&a.id)); + matching_images.dedup(); + return matching_images; }