Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jannik Hellenkamp
website
Commits
238f111e
Commit
238f111e
authored
Jul 26, 2017
by
Andreas Valder
Browse files
fixed genlive import (i hope...)
parent
dabada05
Changes
2
Hide whitespace changes
Inline
Side-by-side
livestreams.py
View file @
238f111e
from
server
import
*
from
sorter
import
schedule_thumbnail
def
genlive
(
streams
):
for
stream
in
streams
:
...
...
@@ -18,5 +17,5 @@ def livestream_thumbnail():
WHERE streams.active AND (? OR streams.visible)
'''
,
ismod
())
for
v
in
genlive
(
livestreams
):
schedule_thumbnail
(
v
[
'lecture_id'
])
sorter
.
schedule_thumbnail
(
v
[
'lecture_id'
])
server.py
View file @
238f111e
...
...
@@ -321,6 +321,15 @@ def tagid(s):
r
=
r
+
c
return
r
def
genlive
(
streams
):
for
stream
in
streams
:
stream
[
'visible'
]
=
True
stream
[
'downloadable'
]
=
False
stream
[
'path'
]
=
'pub/hls/%s.m3u8'
%
stream
[
'livehandle'
]
stream
[
'file_size'
]
=
0
return
streams
@
app
.
route
(
'/'
)
@
register_navbar
(
'Home'
,
icon
=
'home'
)
def
index
():
...
...
@@ -381,8 +390,6 @@ def courses():
groupedby
=
'semester'
return
render_template
(
'courses.html'
,
courses
=
courses
,
groupedby
=
groupedby
)
from
livestreams
import
genlive
@
app
.
route
(
'/<handle>'
)
@
app
.
route
(
'/<int:id>'
)
@
handle_errors
(
'courses'
,
'Diese Veranstaltung existiert nicht!'
,
404
,
IndexError
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment