Permalink
Browse files

Use correct audio format for enclosures

  • Loading branch information...
1 parent cdd7919 commit 24069b33a9bae516efabcab96ef3c1fc51730a91 @pfleidi pfleidi committed Apr 12, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 source/_includes/feed/audioformat_feed.xml
@@ -88,13 +88,15 @@ layout: nil
<description>
<![CDATA[{{ post.content | expand_urls: site.url | cdata_escape }}]]>
</description>
- {% if post.audio %}
- {% if post.audio.mp3 %} {% assign podcast_audio = post.audio.mp3 %}
- {% else %} {% assign podcast_audio = post.audio %}
- {% endif %}
+ {% if post.audioformats %}
+ {% assign podcast_audio = post.audioformats[page.audioformat] %}
{% assign_audio_metadata podcast_audio_meta = podcast_audio %}
- <enclosure url="{{ podcast_audio }}" length="{{ podcast_audio_meta.content_length }}" type="{{ podcast_audio_meta.content_type }}" />
- <media:content url="{{ podcast_audio}}" fileSize="{{ podcast_audio_meta.content_length }}" type="{{ podcast_audio_meta.content_type }}" />
+ <enclosure url="{{ podcast_audio }}"
+ length="{{ podcast_audio_meta.content_length }}"
+ type="{{ podcast_audio_meta.content_type }}" />
+ <media:content url="{{ podcast_audio}}"
+ fileSize="{{ podcast_audio_meta.content_length }}"
+ type="{{ podcast_audio_meta.content_type }}" />
<itunes:keywords>{{ post.tags }}</itunes:keywords>
<itunes:subtitle>{{ post.title }}</itunes:subtitle>
<itunes:summary>

0 comments on commit 24069b3

Please sign in to comment.