Software /
code /
prosody-modules
Changeset
4428:b328ca621ba6
mod_pubsub_feeds: Translate RSS <enclosure> to Atom for podcasts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 04 Feb 2021 20:49:02 +0100 |
parents | 4427:c402b273f2e3 |
children | 4429:157fa4e535b0 |
files | mod_pubsub_feeds/feeds.lib.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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()