123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?xml version="1.0" encoding="utf-8"?>
- <rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:itunesu="http://www.itunesu.com/feed" version="2.0">
- <channel>
- <link><%= @podcast.link %></link>
- <language><![CDATA[<%= @podcast.language %>]]></language>
- <copyright>©2022</copyright>
- <webMaster><![CDATA[<%= @podcast.webmaster %>]]></webMaster>
- <managingEditor><![CDATA[<%= @podcast.webmaster %>]]></managingEditor>
- <image>
- <url><%= @podcast.image.url %></url>
- <title><![CDATA[<%= @podcast.image.title %>]]></title>
- <link><%= @podcast.image.link %></link>
- </image>
- <itunes:owner>
- <itunes:name><![CDATA[<%= @podcast.owner.name %>]]></itunes:name>
- <itunes:email><![CDATA[<%= @podcast.owner.email %>]]></itunes:email>
- </itunes:owner>
- <itunes:category text="<%= HtmlEntities.encode(@podcast.category) %>">
- <itunes:category text="<%= HtmlEntities.encode(@podcast.category) %>" />
- </itunes:category>
- <itunes:keywords><%= @podcast.keywords |> Enum.join(", ") %></itunes:keywords>
- <itunes:explicit><![CDATA[<%= @podcast.explicit %>]]></itunes:explicit>
- <itunes:image href="<%= @podcast.image.url %>" />
- <atom:link href="<%= PodcastFeedWeb.Endpoint.url <> Routes.feed_path(@conn, :by_identifier, @identifier) %>" rel="self" type="application/rss+xml" />
- <pubDate><%= @podcast.pubDate |> Calendar.DateTime.Format.rfc2822 %></pubDate>
- <title><![CDATA[<%= @podcast.title %>]]></title>
- <itunes:author><![CDATA[<%= @podcast.owner.name %>]]></itunes:author>
- <description><![CDATA[<%= @podcast.description %>]]></description>
- <itunes:summary><![CDATA[<%= @podcast.description %>]]></itunes:summary>
- <itunes:subtitle><![CDATA[<%= Regex.run(~r/\A(.{0,255})(?: |\.|\Z)/, @podcast.description) |> List.last() %>]]></itunes:subtitle>
- <lastBuildDate><%= @podcast.lastBuildDate |> Calendar.DateTime.Format.rfc2822 %></lastBuildDate>
- <%= for item <- @items do %>
- <item>
- <title><![CDATA[<%= item.title %>]]></title>
- <link><%= item.link %></link>
- <pubDate><%= item.pubDate |> Calendar.DateTime.Format.rfc2822 %></pubDate>
- <description><![CDATA[<%= item.description %>]]></description>
- <enclosure url="<%= item.link %>" length="<%= item.size %>" type="audio/mpeg"/>
- <guid><%= item.link %></guid>
- <itunes:duration><%= item.length |> format_length %></itunes:duration>
- <itunes:summary><%= item.summary %></itunes:summary>
- <itunes:keywords><![CDATA[<%= item.keywords |> Enum.join(", ") %>]]></itunes:keywords>
- <itunes:explicit><%= item.explicit %></itunes:explicit>
- <itunes:image href="<%= item.image || @podcast.image.url %>" />
- </item>
- <% end %>
- </channel>
- </rss>
|