remove hlsindex from api

This commit is contained in:
deflax 2021-10-12 17:19:18 +00:00
parent 97e345d888
commit 936dcc1f25
3 changed files with 4 additions and 5 deletions

View file

@ -21,9 +21,10 @@ def start():
)
return page
@frontend.route("/player/<appname>/<hlsindex>")
@frontend.route("/player/<appname>/<streamname>")
def show_player(appname, hlsindex):
playerTemplate = '%s/player.html.j2' % zomstream.configuration['template_folder']
hlsindex = streamname.split('_')[0]
page = flask.render_template(
playerTemplate,
appname=appname,

View file

@ -16,7 +16,7 @@
<span style="color: #888; font-size: 14pt;">There are currently no streams running</span>
</p>
{% endif %}
{% for item in items %}
{% for tem in items %}
<article>
<h1>Stream {{ item[1] }}</h1>
<table>

View file

@ -40,10 +40,8 @@ class Zomstream:
for stream in streams:
name = stream.find('name')
rate = stream.find('bw_video')
streamname = name.text
hlsindex = streamname.split('_')[0]
if rate.text != "0":
self.streamnames.append( [appname.text, hlsindex, streamname] )
self.streamnames.append( [appname.text, streamname.text] )
return self.streamnames