Permalink
Browse files

implemented audio player partial for episodes

  • Loading branch information...
1 parent ec0b054 commit c5a2c5f8fcd1fa06d1b7c3408574a838792fd9b1 @yeahiii yeahiii committed Dec 16, 2012
@@ -6,8 +6,10 @@ date: "15.3.2012"
status: "published"
hosts: [lukas, pfleidi]
comments: "8"
-mp3: "http://example.org/retina.mp3"
-aac: "http://example.org/retina.m4a"
+full_url: "http://www.example.com/"
+audioformats:
+ mp3: "http://example.org/retina.mp3"
+ aac: "http://example.org/retina.m4a"
---
!!!
Premiere bei den Retinauten: Extra für das Thema der Woche 'Synchronisation' haben wir [Anne Helm]( http://twitter.com/SeeroiberJenny ) zu Gast, Synchronsprecherin und Piratin aus Berlin. Mit ihr sprechen wir natürlich hauptsächlich über Synchronisation, aber auch über 50 Shades of Grey, Revolution, Dampfmaschinen, Debatten, Kaffee machen und ein paar Filme.
@@ -6,8 +6,10 @@ id: "s01e01"
date: "17.3.2012"
status: "published"
hosts: [lukas, foobert]
-mp3: "http://example.org/house.mp3"
-aac: "http://example.org/house.m4a"
+full_url: "http://www.example.com/"
+audioformats:
+ mp3: "http://example.org/house.mp3"
+ aac: "http://example.org/house.m4a"
---
!!!
Dieses Mal beschäftigt sich der Retinacast mit einem kranken Arzt: Gregory House. Ein moderner, misantrophischer Sherlock Holmes der Medizin, der, gestützt auf seinen Stock und Pillen einwerfend, durch acht Staffeln der Serie “House” humpelt.
@@ -6,9 +6,11 @@ id: "s01e02"
date: "21.3.2012"
status: "planned"
hosts: foobert
-mp3: "http://example.org/lol.mp3"
-aac: "http://example.org/lol.m4a"
-opus: "http://example.org/lol.opus"
+full_url: "http://www.example.com/"
+audioformats:
+ mp3: "http://example.org/lol.mp3"
+ aac: "http://example.org/lol.m4a"
+ opus: "http://example.org/lol.opus"
---
!!!
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
View
@@ -1,6 +1,7 @@
---
name: "rtc"
title: "Retinacast"
+author: "Ratinacast Crew"
cover_url: "http://placekitten.com/300/300"
---
View
@@ -1,6 +1,7 @@
---
name: "rtn"
title: "Retinauten"
+author: "Retinauten"
cover_url: "http://placekitten.com/500/500"
---
Die Retinauten sind unsere Talksendung, bei wir uns über Filme, Serien, Popkultur und alles andere unterhalten. An _jedem zweiten Sonntag_ werden die Retinauten *live* aufgezeichnet und gestreamt.
@@ -3,37 +3,40 @@ xml.feed("xml:lang" => 'de',"xmlns" => "http://www.w3.org/2005/Atom", "xmlns:itu
xml.title @show ? @show.title : settings.title
xml.id "http://binaergewitter.de/"
- xml.updated Date.parse(@episodes.first.date).to_datetime.rfc3339 unless @episodes.empty?
+ xml.updated @episodes.first.date.to_datetime.rfc3339 unless @episodes.empty?
xml.author { xml.name(@show ? @show.author : settings.author) }
xml.tag!("itunes:summary", "")
xml.tag!("itunes:author", "author")
xml.tag!("itunes:explicit", "no")
xml.tag!("itunes:image", {"href" => @show ? @show.cover_url : settings.cover_url})
xml.tag!("itunes:category", {"text" => "Technology"})
-
+
xml.tag!("itunes:owner"){
xml.tag!("itunes:name", "author")
xml.tag!("itunes:email", "info@binaergewitter.de")
}
xml.link({"rel" => "self", "href" => request.url})
+ @episodes.each do |episode|
+ if !episode.meta_data["audioformats"].nil?
+ xml.tag!("debug", episode.meta_data["audioformats"][@audio_format])
- @episodes.each do |episode|
- if !episode.meta_data[@audio_format].nil?
- xml.entry do
- xml.title episode.title
- xml.link "rel" => "alternate", "href" => episode.full_url
- xml.link "href" => episode.meta_data[@audio_format], 'rel' => 'enclosure', 'type' => "audio/mpeg"
- xml.id episode.meta_data[@audio_format]
- xml.published Date.parse(episode.date).to_datetime.rfc3339
- xml.updated Date.parse(episode.date).to_datetime.rfc3339
- xml.author { xml.name("author") }
- xml.summary do
- xml.cdata!(markdown episode.content)
- end
- xml.content do
- xml.cdata!(markdown episode.content)
+ if !episode.meta_data["audioformats"][@audio_format].nil?
+ xml.entry do
+ xml.title episode.title
+ xml.link "rel" => "alternate", "href" => episode.meta_data["full_url"]
+ xml.link "href" => episode.meta_data["audioformats"][@audio_format], 'rel' => 'enclosure', 'type' => "audio/mpeg"
+ xml.id episode.meta_data["audioformats"][@audio_format]
+ xml.published episode.date.to_datetime.rfc3339
+ xml.updated episode.date.to_datetime.rfc3339
+ xml.author { xml.name("author") }
+ xml.summary do
+ xml.cdata!(markdown episode.content)
+ end
+ xml.content do
+ xml.cdata!(markdown episode.content)
+ end
end
end
end
@@ -0,0 +1,9 @@
+<audio preload="none" controls>
+ - for audio_format in episode.audioformats.keys do
+ source href="#{episode.audioformats[audio_format]}" type="audio/#{audio_format}"
+</audio>
+
+p
+ - for audio_format in episode.audioformats.keys do
+ a href="#{episode.audioformats[audio_format]}" #{audio_format}
+
@@ -17,3 +17,4 @@
- if mode == "full"
== markdown episode.content
+ == slim :"includes/_episode-player", :locals => { :episode => episode}

0 comments on commit c5a2c5f

Please sign in to comment.