diff --git a/serious/lib/serious/article.rb b/serious/lib/serious/article.rb index 4591039..2de54ab 100755 --- a/serious/lib/serious/article.rb +++ b/serious/lib/serious/article.rb @@ -112,6 +112,10 @@ def audioformats @audio ||= yaml["audioformats"] || {} end + def voices + @voices ||= yaml["voices"] || {} + end + # Hash for each file format the matching file size def audio_file_sizes return @audio_file_sizes if defined?(@audio_file_sizes) diff --git a/serious/lib/site/views/rss.builder b/serious/lib/site/views/rss.builder index 98543a2..ee74eb5 100755 --- a/serious/lib/site/views/rss.builder +++ b/serious/lib/site/views/rss.builder @@ -2,7 +2,7 @@ require 'cgi' require 'time' xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8" -xml.rss "xmlns:itunes" => "http://www.itunes.com/dtds/podcast-1.0.dtd", "xmlns:atom" => "http://www.w3.org/2005/Atom", "xmlns:content" => "http://purl.org/rss/1.0/modules/content/", "xmlns:media" => "http://search.yahoo.com/mrss/", :version => "2.0" do +xml.rss "xmlns:itunes" => "http://www.itunes.com/dtds/podcast-1.0.dtd", "xmlns:atom" => "http://www.w3.org/2005/Atom", "xmlns:content" => "http://purl.org/rss/1.0/modules/content/", "xmlns:media" => "http://search.yahoo.com/mrss/", "xmlns:podcast" => "https://podcastindex.org/namespace/1.0", :version => "2.0" do xml.channel do xml.title catetory_tite(@category) xml.link category_url(@category) @@ -60,6 +60,10 @@ xml.rss "xmlns:itunes" => "http://www.itunes.com/dtds/podcast-1.0.dtd", "xmlns:a xml.itunes :duration, article.duration_timestring + # people + for voice in article.voices.select { |key, value| value } do + xml.tag!("podcast:person", "#{voice[0]}") + end # chapter marks xml.tag!("psc:chapters", "xmlns:psc" => "http://podlove.org/simple-chapters", :version => "1.2") do for item in article.chapter do