Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Video AG Infrastruktur
website
Commits
11ffa116
Commit
11ffa116
authored
6 years ago
by
Julian Rother
Browse files
Options
Downloads
Patches
Plain Diff
Fixed livestream handle names
parent
f9fdf6cd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
livestreams.py
+1
-1
1 addition, 1 deletion
livestreams.py
server.py
+4
-4
4 additions, 4 deletions
server.py
with
5 additions
and
5 deletions
livestreams.py
+
1
−
1
View file @
11ffa116
...
...
@@ -9,7 +9,7 @@ def livestream_thumbnail():
livestreams
=
query
(
'
SELECT streams.lecture_id, streams.handle AS livehandle FROM streams WHERE streams.active
'
)
lectures
=
query
(
'
SELECT * FROM lectures WHERE stream_job IS NOT NULL
'
)
for
v
in
genlive
(
livestreams
)
+
genlive_new
(
lectures
):
schedule_job
(
'
thumbnail
'
,
{
'
src
'
:
v
[
'
path
'
],
'
filename
'
:
'
l_
%i.jpg
'
%
v
[
'
lecture_id
'
]})
schedule_job
(
'
thumbnail
'
,
{
'
src
'
:
v
[
'
path
'
],
'
filename
'
:
'
%i.jpg
'
%
v
[
'
lecture_id
'
]})
@app.route
(
'
/internal/streaming/legacy_auth
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
@app.route
(
'
/internal/streaming/legacy_auth/<server>
'
,
methods
=
[
'
GET
'
,
'
POST
'
])
...
...
This diff is collapsed.
Click to expand it.
server.py
+
4
−
4
View file @
11ffa116
...
...
@@ -141,8 +141,8 @@ def genlive_new(lectures):
for
lecture
in
lectures
:
if
not
lecture
[
'
stream_job
'
]:
continue
res
.
append
({
'
livehandle
'
:
'
l_
%i
'
%
lecture
[
'
id
'
],
'
visible
'
:
True
,
'
downloadable
'
:
False
,
'
path
'
:
'
pub/hls/
l_
%i.m3u8
'
%
lecture
[
'
id
'
],
res
.
append
({
'
livehandle
'
:
'
%i
'
%
lecture
[
'
id
'
],
'
visible
'
:
True
,
'
downloadable
'
:
False
,
'
path
'
:
'
pub/hls/%i.m3u8
'
%
lecture
[
'
id
'
],
'
file_size
'
:
0
,
'
formats
'
:
hls_format
,
'
lecture_id
'
:
lecture
[
'
id
'
]})
return
res
...
...
@@ -186,7 +186,7 @@ def index():
WHERE lectures.stream_job IS NOT NULL AND (? OR (courses.visible AND courses.listed AND lectures.visible))
'''
,
ismod
())
for
stream
in
livestreams_new
:
stream
[
'
livehandle
'
]
=
'
l_
%i
'
%
stream
[
'
id
'
]
stream
[
'
livehandle
'
]
=
'
%i
'
%
stream
[
'
id
'
]
featured
=
query
(
'
SELECT * FROM featured WHERE (? OR visible) ORDER BY `order`
'
,
ismod
())
featured
=
list
(
filter
(
lambda
x
:
not
x
[
'
deleted
'
],
featured
))
for
item
in
featured
:
...
...
@@ -398,7 +398,7 @@ def auth(): # For use with nginx auth_request
if
url
.
endswith
(
'
jpg
'
)
or
ismod
():
return
"
OK
"
,
200
if
url
.
startswith
(
'
pub/hls/
'
):
handle
=
url
[
len
(
'
pub/hls/
'
):].
r
split
(
'
_
'
)[
0
].
split
(
'
.
'
)[
0
]
handle
=
url
[
len
(
'
pub/hls/
'
):].
split
(
'
_
'
)[
0
].
split
(
'
.
'
)[
0
]
if
handle
.
startswith
(
'
l_
'
):
perms
=
query
(
'''
SELECT lectures.id AS lecture, perm.*
FROM lectures
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment