From 4a5cab56d0fbd18e0e6e30b6d8b5930eb9b16237 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 29 Aug 2022 19:14:17 -0400 Subject: [PATCH] hack to support media:content This is ugly, but XML::Feed does not support the tag. --- CHANGELOG | 1 + IkiWiki/Plugin/aggregate.pm | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index f33c3bd14..a30a5de00 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ ikiwiki (3.20200202.4) UNRELEASED; urgency=medium * aggregate: When a feed has an enclosure that is an image, audio, or video, include the enclosure in the generated page. + * aggregate: Also support feeds with media:content tags. -- Joey Hess Sat, 25 Dec 2021 12:41:34 -0400 diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 01e026c88..2069a352e 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -535,6 +535,14 @@ sub aggregate (@) { next; } my $content=$res->content; + + # This is a hack to support the media:content extension + # to RSS. XML::Feed does not support it, but it's the same + # as an enclosure, so converting it to that tag will let it + # parse. + $content=~s/parse(\$content)}; if ($@) { # One common cause of XML::Feed crashing is a feed