summaryrefslogtreecommitdiff
path: root/app/podcasts/urls_feeds.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/podcasts/urls_feeds.py')
-rw-r--r--app/podcasts/urls_feeds.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/podcasts/urls_feeds.py b/app/podcasts/urls_feeds.py
new file mode 100644
index 0000000..07e02ae
--- /dev/null
+++ b/app/podcasts/urls_feeds.py
@@ -0,0 +1,17 @@
+from django.urls import include, re_path
+
+from .feeds import RssShowFeed, AtomShowFeed, AtomRedirectView, RssRedirectView
+from .models import MIME_CHOICES
+
+
+MIMES = "|".join([enclosure[0] for enclosure in MIME_CHOICES])
+
+
+urlpatterns = [
+ # Episode list feed by podcast (RSS 2.0 and iTunes)
+ re_path(r"^(?P<show_slug>[-\w]+)/(?P<mime_type>{mimes})/rss/$".format(mimes=MIMES),
+ RssShowFeed(), name="podcasts_show_feed_rss"),
+ # Episode list feed by show (Atom)
+ re_path(r"^(?P<show_slug>[-\w]+)/(?P<mime_type>{mimes})/atom/$".format(mimes=MIMES),
+ AtomShowFeed(), name="podcasts_show_feed_atom"),
+]