From 122a5343cbe2f9a06d8b626afb7cb197ba1c8d65 Mon Sep 17 00:00:00 2001 From: Enoch Ma Date: Mon, 23 Mar 2026 09:58:57 +0800 Subject: [PATCH] feat(route/aeon): improve compatibility by enforcing the correct jpg enclosure type (#21470) * Enforce enclosure type * remove trailing space --- lib/routes/aeon/utils.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/routes/aeon/utils.tsx b/lib/routes/aeon/utils.tsx index 7500e7eb9..4d9e71725 100644 --- a/lib/routes/aeon/utils.tsx +++ b/lib/routes/aeon/utils.tsx @@ -95,6 +95,15 @@ export const getData = async (list) => { delete item.image; item.enclosure_url = data.audioUrl; item.enclosure_type = 'audio/mpeg'; + } else if (data.image?.url) { + const imageUrl = data.image.url; + const cleanImageUrl = imageUrl.split('?')[0].toLowerCase(); + + item.enclosure_url = imageUrl; + if (cleanImageUrl.endsWith('.jpg') || cleanImageUrl.endsWith('.jpeg')) { + item.enclosure_type = 'image/jpeg'; + } + item.image = imageUrl; } const capture = load(data.body, null, false);