@@ -18,10 +18,7 @@
#
from datetime import datetime
import itertools
import operator
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.contrib.syndication.views import Feed, add_domain
from django.shortcuts import render
@@ -55,8 +52,10 @@ class CastFeedBase(Feed):
break
return {'year': year}
def for_podcast_feed_extra_kwargs(self, obj):
return { 'managingEditorNames' : 'Bradley and Karen',
return {
'managingEditorNames': 'Bradley and Karen',
'rssImage': {'url': 'http://faif.us/img/cast/faif_144x144.jpg',
'width': '144', 'height': '144'},
'webMaster': 'oggcast@faif.us (Bradley and Karen)',
@@ -73,13 +72,18 @@ def for_podcast_feed_extra_kwargs(self, obj):
'iTunesAuthor': 'Software Freedom Conservancy',
'iTunesSubtitle': 'Bi-Weekly Discussion of Legal, Policy, and Any other Issues in the Free, Libre, and Open Source Software (FLOSS) Community',
'copyrightHolder': self.copyright_holder(),
'copyrightLicense' : self.license_no_html() }
'copyrightLicense': self.license_no_html(),
}
def for_podcast_item_extra_kwargs(self, item):
return { 'duration' : item.duration,
'duration': item.duration,
'year': item.date_created.year,
'dcCreator': 'oggcast@faif.us (Bradley and Karen)',
'intheitembkuhn' : item.__dict__.__str__()}
'intheitembkuhn': item.__dict__.__str__(),
def podcast_helper_add_root_elements(self, handler):
handler.addQuickElement('managingEditor', self.feed['author_email']
@@ -139,6 +143,7 @@ def podcast_helper_add_root_elements(self, handler):
handler.addQuickElement('copyright', copyrightString)
handler.addQuickElement('media:copyright', "Copyright (C) " + copyrightString)
def podcast_helper_add_item_elements(self, handler, item):
handler.addQuickElement("itunes:explicit", self.feed['iTunesExplicit'])
handler.addQuickElement("itunes:block", self.feed['iTunesBlock'])
@@ -236,6 +241,7 @@ class Mp3CastFeed(CastFeed):
def item_enclosure_length(self, item):
return item.mp3_length
class OggCastFeed(CastFeed):
def item_enclosure_mime_type(self): return "audio/ogg"
def item_enclosure_url(self, item):
@@ -243,6 +249,7 @@ class OggCastFeed(CastFeed):
return item.ogg_length
feed_dict = {
'cast-ogg': OggCastFeed,
'cast-mp3': Mp3CastFeed,
@@ -252,6 +259,7 @@ feed_dict = {
for k, v in feed_dict.items():
v.get_absolute_url = '/feeds/%s/' % k
def view(request):
"""Listing of all available feeds
"""