# HG changeset patch # User Kim Alvefur # Date 1612468142 -3600 # Node ID b328ca621ba68c8bdfcf883b0bb64fcd533003e6 # Parent c402b273f2e3ae19447f76db7f1cbab20dc3a4b8 mod_pubsub_feeds: Translate RSS to Atom for podcasts diff -r c402b273f2e3 -r b328ca621ba6 mod_pubsub_feeds/feeds.lib.lua --- a/mod_pubsub_feeds/feeds.lib.lua Thu Feb 04 16:16:29 2021 -0001 +++ b/mod_pubsub_feeds/feeds.lib.lua Thu Feb 04 20:49:02 2021 +0100 @@ -12,6 +12,10 @@ atom_entry:tag("link", { href = tag:get_text() }):up(); end +function rss2atom.enclosure(atom_entry, tag) + atom_entry:tag("link", { rel = "enclosure", href = tag.attr.url, type = tag.attr.type, length = tag.attr.length }):up(); +end + function rss2atom.author(atom_entry, tag) atom_entry:tag("author") :tag("email"):text(tag:get_text()):up()