remove version check

This commit is contained in:
Roy Olav Purser 2021-05-10 17:47:34 +02:00
parent 326c6699d7
commit 060e1807ef
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -50,14 +50,10 @@ if icecast_server is not None and stream_server is not None:
playlist += stream_server + key + "\n" playlist += stream_server + key + "\n"
template = None template = None
videojs_version = None
try: try:
with open("/app/index.html", "r") as f: with open("/app/index.html", "r") as f:
template = tornado.template.Template(f.read().strip()) template = tornado.template.Template(f.read().strip())
except Exception as e:
print(e)
videojs_version = None
try:
with open("/app/videojs-version.txt", "r") as f: with open("/app/videojs-version.txt", "r") as f:
videojs_version = f.read().strip() videojs_version = f.read().strip()
except Exception as e: except Exception as e:
@ -144,7 +140,7 @@ class MainHandler(tornado.web.RequestHandler):
self.write("Stream not found.") self.write("Stream not found.")
def handle_render(self, provider, write): def handle_render(self, provider, write):
if template is not None and version is not None: if template is not None:
stream_path = f'{self.request.path}?provider={provider}' stream_path = f'{self.request.path}?provider={provider}'
rendered = template.generate(stream=stream_path, videojs_version=videojs_version) rendered = template.generate(stream=stream_path, videojs_version=videojs_version)
self.write(rendered) self.write(rendered)