]> git.0d.be Git - panikweb.git/blobdiff - panikweb/views.py
templates: strip label of embed dialog
[panikweb.git] / panikweb / views.py
index 069a4ac858f61ce41051b51895a19312ae2c0c33..f918932890c383817649aeb3513441ffb830cf8e 100644 (file)
@@ -730,18 +730,28 @@ class RssCustomPodcastsFeed(Rss201rev2Feed):
             handler.addQuickElement('title', 'Radio Esperanzah!')
         handler.addQuickElement('url', image_url)
         handler.endElement('image')
+        handler.addQuickElement('itunes:explicit', 'no')  # invidividual items will get their own value
         handler.addQuickElement('itunes:image', None, {'href': image_url})
         if emission:
             if emission.subtitle:
                 handler.addQuickElement('itunes:subtitle', emission.subtitle)
-            if emission.title:
-                handler.addQuickElement('itunes:author', emission.title)
-            else:
-                handler.addQuickElement('itunes:author', 'Radio Esperanzah!')
             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()
         attrs['xmlns:dc'] = 'http://purl.org/dc/elements/1.1/'