From f9a8cd4100f90df9f35ff8c3070428cf7467dccc Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Sat, 14 Oct 2017 16:53:39 +0200
Subject: [PATCH] Fixed livestream announcements in recent videos panel, closes
 #330

---
 server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server.py b/server.py
index 3bea935..92f5b84 100644
--- a/server.py
+++ b/server.py
@@ -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')
-- 
GitLab