From: Frédéric Péters Date: Thu, 19 Sep 2019 15:05:21 +0000 (+0200) Subject: add itunes:owner to feed X-Git-Tag: v2021~26 X-Git-Url: https://git.0d.be/?p=panikweb-esperanzah.git;a=commitdiff_plain;h=c9aa98d225dad07545780dc68e65c68d35aeddaf add itunes:owner to feed --- diff --git a/panikweb/views.py b/panikweb/views.py index 2545471..f918932 100644 --- a/panikweb/views.py +++ b/panikweb/views.py @@ -735,13 +735,22 @@ class RssCustomPodcastsFeed(Rss201rev2Feed): if emission: if emission.subtitle: handler.addQuickElement('itunes:subtitle', emission.subtitle) - if emission.title: - handler.addQuickElement('itunes:author', emission.title) for category in emission.categories.all(): if category.itunes_category: handler.addQuickElement('itunes:category', None, {'text': category.itunes_category}) + + handler.addQuickElement('itunes:author', emission.title) + handler.startElement('itunes:owner', {}) + if emission.email: + handler.addQuickElement('itunes:email', emission.email) + handler.addQuickElement('itunes:name', emission.title) + handler.endElement('itunes:owner') else: handler.addQuickElement('itunes:author', 'Radio Esperanzah!') + handler.startElement('itunes:owner', {}) + handler.addQuickElement('itunes:email', 'radio@esperanzah.be') + handler.addQuickElement('itunes:name', 'Radio Esperanzah!') + handler.endElement('itunes:owner') def root_attributes(self): attrs = super(RssCustomPodcastsFeed, self).root_attributes()