adrian tried to create a delayed job for the download statistics:
[opensuse:software-o-o.git] / app / views / codecs / index.rhtml
1 <%
2 @visitor.os_release =~ /(.+) \((.+)\)/
3 os_release_display = "#{$1}"
4 architecture = $2
5
6 case architecture
7 when 'i386', 'i586', 'i686'
8   architecture = "32 bit, #{architecture}"
9 end
10
11 @right_box = :search
12 @page_title = "Proprietary Multimedia Support in openSUSE"
13
14 wm_framework = nil
15 @visitor.missing_codecs.each do | codec | 
16   if codec.fourcc.include?("/x-ms-asf")
17     wm_framework = codec.display_framework
18     break
19   end
20 end
21
22 -%>
23
24 <p style="font-size: 120%">
25   <% if @visitor.missing_codecs.length > 0 %>
26     <% if @visitor.application %><%= h(@visitor.application.titlecase) %><% else %>The application you are using<% end %> requires the following additional proprietary third-party software to support the content you have attempted to play:
27   </p>
28
29   <ul class="navlist" style="margin-bottom: 1.5em">
30     <% if wm_framework  %>
31       <li>Windows Media decoder (<%= h(wm_framework) %>, <%= h(architecture) %>)</li>
32     <% end %>
33     <% @visitor.missing_codecs.each do | codec | %>
34       <% if (@visitor.os_release && (@visitor.os_release.include?('11.0') || @visitor.os_release.include?('11.1') || @visitor.os_release.include?('10.3'))) &&
35           codec.framework.downcase.include?("gstreamer") && codec.description.downcase.include?("mp3") %>
36         <li><p>Fluendo MP3 Decoder</p><div class="install_btn" style="float: none"><a href="http://download.opensuse.org/YaST/gst-fluendo-mp3.ymp">1-Click Install</a></div></li>
37       <% else %>
38         <li><%= h(codec.description) %> (<%= h(codec.display_framework) %>, <%= h(architecture) %>)</li>
39       <% end %>
40     <% end %>
41   </ul>
42
43   <p style="font-size: 120%">The following links may assist you in obtaining the necessary software:</p>
44
45 <% else %>
46   Support for proprietary formats and codecs is not shipped out-of-the box in openSUSE. Please follow the links below for more information on obtaining the necessary software required to play proprietary multimedia content.
47   </p>
48 <% end %>
49
50 <ul class="navlist">
51   <li style="margin-bottom: 1em"><a href="https://shop.fluendo.com/?referrer=opensuse"><strong>Fluendo Webshop</strong></a><br />
52     <em>Fluendo provides high quality codecs for the GStreamer multimedia framework.</em></li>
53
54   <li><a href="http://opensuse-community.org/Multimedia"><strong>Community Information</strong></a><br />
55     <em>Alternate codecs are available by following community instructions, but may require a license.</em></li>
56 </ul>
57
58 <h2 style="margin-top: 1em">Further Information</h2>
59
60 <p>For more information about why some formats and codecs are restricted and why they don't ship out-of-the-box on openSUSE, 
61   please read about <a href="http://en.opensuse.org/Restricted_formats">Restricted Formats</a>.</p>
62
63 <div class="orange_box" style="margin: 3em 0 1em 0">
64   <div class="box_top_row">
65     <div class="box_left"></div>
66     <div class="box_right"></div>
67   </div>
68   <div class="box_title_row">
69     <div class="box_title"><p>Disclaimer / Warning</p></div>
70   </div>
71   <div class="box_content" style="font-size: 80%">
72     <p>The links above allow you to leave the openSUSE site. The linked sites are not under the control of Novell
73       and Novell is not responsible for the contents of any linked site or any link contained in a linked site,
74       or any changes or updates to such sites. Novell is providing these links to you only as a convenience, and
75       the inclusion of any link does not imply endorsement by Novell of any linked site.</p>
76   </div>
77   <div class="box_bottom_row">
78     <div class="box_left"></div>
79     <div class="box_right"></div>
80   </div>
81 </div>
82