Commit f9a8cd41 authored by Julian Rother's avatar Julian Rother
Browse files

Fixed livestream announcements in recent videos panel, closes #330

parent 0136e164
......@@ -379,7 +379,7 @@ def index():
item['courses'] = query('SELECT * FROM courses WHERE (visible AND listed) AND `%s` = ? ORDER BY `%s`'%(item['param'], item['param']), item['param2'])
elif item['type'] == 'video':
item['lecture'] = {'id': item['param']}
livestreams = query('''SELECT streams.handle AS livehandle, streams.lecture_id, "formats" AS sep, formats.*
streams = query('''SELECT streams.handle AS livehandle, streams.lecture_id, "formats" AS sep, formats.*
FROM streams
JOIN lectures ON lectures.id = streams.lecture_id
JOIN formats ON formats.keywords = "hls"
......@@ -391,7 +391,7 @@ def index():
JOIN formats ON (videos.video_format = formats.id)
WHERE videos.lecture_id = ? AND videos.visible
ORDER BY formats.prio DESC
''', item['param'])+genlive(livestreams)
''', item['param'])+genlive(streams)
return render_template('index.html', latestvideos=livestreams+latestvideos, upcomming=upcomming, featured=featured)
@app.route('/courses')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment