Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/lca' into lca
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Feb 27, 2012
2 parents 8e948d4 + 69211f4 commit d7a119c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 28 deletions.
20 changes: 12 additions & 8 deletions appengine/index.py
Expand Up @@ -54,8 +54,8 @@ def get(self, group):
self.redirect('/')
return

channel = CONFIG.get('groups', group)
justintv = CONFIG.get('justintv', group)
channel = CONFIG.get(group, 'channel')
justintv = CONFIG.get(group, 'justintv')

template = self.request.get('template', '')
if not re.match('[a-z]+', template):
Expand All @@ -73,9 +73,9 @@ def get(self, group):
screen = False

try:
hashtag = CONFIG.get('twitter', group)
hashtag = CONFIG.get(group, 'twitter')
except ConfigParser.NoOptionError, e:
hashtag = CONFIG.get('twitter', 'default')
hashtag = CONFIG.get('default', 'twitter')

self.response.headers['Content-Type'] = 'text/html'
self.response.out.write(r('templates/%s.html' % template, locals()))
Expand All @@ -93,7 +93,7 @@ def get(self, group):
self.out.write("window.src = '/';\n");
return

channel = CONFIG.get('groups', group)
channel = CONFIG.get(group, 'channel')

# Get all the active streaming severs for this channel
ten_mins_ago = datetime.datetime.now() - datetime.timedelta(minutes=10)
Expand Down Expand Up @@ -164,15 +164,19 @@ class GroupsTemplate(webapp.RequestHandler):
def get(self, template="groups"):
# Get the currently active groups
ten_mins_ago = datetime.datetime.now() - datetime.timedelta(minutes=10)
groups = set()
group_names = set()
for server in models.Encoder.all():
if server.lastseen < ten_mins_ago:
continue
groups.add(server.group)
group_names.add(server.group)

global channels

hashtag = CONFIG.get('twitter', 'default')
groups = {}
for group in group_names:
groups[group] = dict(CONFIG.items(group))

hashtag = CONFIG.get('default', 'twitter')

self.response.headers['Content-Type'] = 'text/html'
self.response.out.write(r('templates/%s.html' % template, locals()))
Expand Down
5 changes: 2 additions & 3 deletions appengine/static/css/style.css
Expand Up @@ -17,9 +17,8 @@ body {
width: 100%;
height: 100%;
margin: 0;
background-color: black;
background-image: url('http://linux.conf.au/images/ballarat.jpg');
font-family: "Century Gothic",Arial, Helvetica, Sans-Serif;
background-color: white;
font-family: "Trebuchet MS", "Tahoma", "Verdana", "Arial", "Helvetica", Sans-Serif;
text-align:center;
padding: 1px;
}
Expand Down
2 changes: 0 additions & 2 deletions appengine/templates/footer.html
Expand Up @@ -2,8 +2,6 @@
-*- coding: utf-8 -*-
vim: set ts=2 sw=2 et sts=2 ai:
{% endcomment %}
Bandwidth provided by <a href="http://www.aarnet.edu.au">
AARNET</a>,
Backend provided by <a href="http://www.orionvm.com.au">
OrionVM</a>,
Frontend hosted on <a href="http://appengine.google.com/">
Expand Down
20 changes: 8 additions & 12 deletions appengine/templates/groups.html
Expand Up @@ -72,7 +72,7 @@ <h1>
<tr>
<td style="width: 240px; vertical-align: top;">
<div id="sponsor-front" class="container_3">
<div class='talk_info'>Streaming Sponsors</div>
<div class='talk_info'>Streaming Sponsor</div>
<div id="sponsor-1">
<a href="http://www.orionvm.com.au/"><img src="/static/img/orionvm.png"></a>
<div id="sponsor-1-info">
Expand All @@ -81,13 +81,10 @@ <h1>
Linux.
</p><p>
To see the platform in action <a href="https://panel.orionvm.com.au/signup/">sign up</a>
and mention linux.conf.au for $50 free credit.
and mention SLUG for $50 free credit.
</p>
</div>
</div>
<div id="sponsor-2">
<a href="http://www.aarnet.edu.au/"><img src="/static/img/aarnet.gif" alt="Australia's Academic and Research Network"></a>
</div>
</div>
</td>
<td id="twitter-cell" style="height: auto;">
Expand All @@ -114,7 +111,7 @@ <h1>
{% for group in groups %}
<img id="video-preload-{{group}}" class="video_preload">
{% endfor %}

</div>
<script type="text/javascript">

Expand All @@ -126,27 +123,26 @@ <h1>
});
{% endfor %}
function update_video() {
{% for group in groups %}
{% for group, v in groups.items %}
$('#video-preload-{{group|escapejs}}').attr(
'src', "http://extra.streamti.me/~irc/%23lca2012-{{group|urlencode}}/latest.png?time="+current_time()
'src', "{{v.preview}}?time="+current_time()
);
{% endfor %}
}

function update_chat() {
{% for group in groups %}
{% for group, v in groups.items %}
$('#chat-preview-{{group|escapejs}}').attr(
'src', "http://extra.streamti.me/~irc/frameit-ng.php?channel=%23lca2012-{{group|urlencode}}&time="+current_time()
'src', "{{v.irclog}}&time="+current_time()
);
{% endfor %}
setTimeout(update_chat, 20000);
}


$('#sponsor-1').hover(
function() {
$('#sponsor-1-info').stop(true, true).slideDown();
},
},
function() {
$('#sponsor-1-info').stop(true, true).slideUp();
});
Expand Down
4 changes: 2 additions & 2 deletions appengine/templates/index.html
Expand Up @@ -89,12 +89,12 @@
Linux.
</p><p>
To see the platform in action <a href="https://panel.orionvm.com.au/signup/">sign up</a>
and mention linux.conf.au for $50 free credit.
and mention {{group|upper}} for $50 free credit.
</p>
</div>
</div>
<div id='sponsor-2'>
<a href="http://www.aarnet.edu.au/"><img src="/static/img/aarnet.gif" alt="Australia's Academic and Research Network"></a>
<a href="{{link}}"><img src="{{logo}}" alt="{{text}}"></a>
</div>
</td>
</tr><tr>
Expand Down
2 changes: 1 addition & 1 deletion tools/flumotion
Submodule flumotion updated from 9db532 to c3fee1

0 comments on commit d7a119c

Please sign in to comment.