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~235 X-Git-Url: https://git.0d.be/?p=panikweb.git;a=commitdiff_plain;h=2f04ee425c8b7493110e9141ff4d767f1491e268 add itunes:owner to feed --- diff --git a/panikweb/views.py b/panikweb/views.py index ab76618..e694c90 100644 --- a/panikweb/views.py +++ b/panikweb/views.py @@ -682,13 +682,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 Panik') + handler.startElement('itunes:owner', {}) + handler.addQuickElement('itunes:email', 'info@radiopanik.org') + handler.addQuickElement('itunes:name', 'Radio Panik') + handler.endElement('itunes:owner') def root_attributes(self): attrs = super(RssCustomPodcastsFeed, self).root_attributes()