forked from rho_n/hpr_generator
		
	Fix setting of RSS feed enclosures mime-type
Mime-type does not always match file extension.
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| <!--% PROCESS 'shared-item.tpl.xml' %--> | ||||
| <!--% PROCESS 'rss-query-hpr.tpl.xml' %--> | ||||
| <!--% FOREACH episode IN feed_result %--> | ||||
| <!--% display_item(episode, 'mp3') %--> | ||||
| <!--% display_item(episode, 'mp3', 'mpeg') %--> | ||||
| <!--% END %--> | ||||
|   | ||||
| @@ -1,5 +1,8 @@ | ||||
| <!--% PROCESS 'shared-utils.tpl.html' %--> | ||||
| <!--% MACRO display_item(episode, media_type) BLOCK %--> | ||||
| <!--% MACRO display_item(episode, file_extension, audio_mime_type) BLOCK %--> | ||||
| <!--% IF audio_mime_type == ""  %--> | ||||
| <!--% audio_mime_type = 'ogg' %--> | ||||
| <!--% END %--> | ||||
| <item> | ||||
| 	  <itunes:explicit><!--% display_explicit_feed(episode.explicit) %--></itunes:explicit> | ||||
|     <googleplay:explicit><!--% display_explicit_feed(episode.explicit) %--></googleplay:explicit> | ||||
| @@ -14,7 +17,7 @@ | ||||
|     <itunes:summary><![CDATA[<!--% episode.notes %-->]]> | ||||
| </itunes:summary> | ||||
|     <pubDate><!--% format_feed_date(episode.date) %--></pubDate> | ||||
|     <enclosure url="http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% media_type %-->" length="<!--% episode.duration * 1000 %-->" type="audio/<!--% media_type %-->"/> | ||||
| 	<guid>http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% media_type %--></guid> | ||||
|     <enclosure url="http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %-->" length="<!--% episode.duration * 1000 %-->" type="audio/<!--% audio_mime_type %-->"/> | ||||
| 	<guid>http://hackerpublicradio.org/eps/hpr<!--% zero_pad_left(episode.id) %-->.<!--% file_extension %--></guid> | ||||
|   </item> | ||||
| <!--% END %--> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user