Changeset 1258

Show
Ignore:
Timestamp:
07/27/08 14:36:08 (4 months ago)
Author:
alban
Message:

Support de plusieurs contents (principals) par episode. Refs #10

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/views/public/feed.rxml

    r1214 r1258  
    1616 
    1717                for episode in @show.episodes 
    18          content = episode.contents.first 
    19          next if content.nil? 
     18         contents = episode.contents.principal 
    2019 
    21            xml.item do 
    22                  xml.title episode.title 
     20         for content in contents 
     21             xml.item do 
     22         title = episode.title 
     23         title += " - #{content.name}" if contents.many? 
     24                 xml.title title 
    2325 
    24                # TODO add keywords here 
    25                # xml.itunes :keywords, document.tags[0..11].join(",") 
     26               # TODO add keywords here 
     27               # xml.itunes :keywords, document.tags[0..11].join(",") 
    2628 
    27                xml.description textilize_in_text(episode.description) 
    28        xml.itunes :summary, textilize_in_text(episode.description) 
     29               xml.description textilize_in_text(episode.description) 
     30         xml.itunes :summary, textilize_in_text(episode.description) 
    2931 
    30                xml.itunes :duration, "#{content.duration}:00" if content.has_duration? 
     32               xml.itunes :duration, "#{content.duration}:00" if content.has_duration? 
    3133 
    32        # TODO add content length 
    33          xml.enclosure :url => content.content_url(:format => :mp3), :type => "audio/mpeg" 
    34          xml.guid url_for_episode(episode, :only_path => false) 
    35          xml.pubDate episode.updated_at.strftime("%a, %e %b %Y %T %Z") 
     34         # TODO add content length 
     35         xml.enclosure :url => content.content_url(:format => :mp3), :type => "audio/mpeg" 
     36         xml.guid url_for_episode(episode, :only_path => false) 
     37         xml.pubDate episode.updated_at.strftime("%a, %e %b %Y %T %Z") 
     38             end 
    3639           end 
    3740                end