add title

This commit is contained in:
Roy Olav Purser 2021-05-25 10:35:54 +02:00
parent ff181da10f
commit 0645a5a376
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -350,14 +350,13 @@ class MainHandler(tornado.web.RequestHandler):
if script_file is not None and template_html is not None:
meta = await handler.meta()
meta_list = list(meta.items())
title = handler.render_url
video_title = meta.get("og:title")
title = meta.get("og:title")
data["script"] = script_file
data["videojs_version"] = videojs_version
data["chromecast_version"] = chromecast_version
data["font_awesome_version"] = font_awesome_version
data["custom_style"] = custom_style
rendered_html = template_html.generate(data=data, meta=meta, title=video_title)
rendered_html = template_html.generate(data=data, meta=meta_list, title=title)
self.write(rendered_html)
else:
self.set_status(404)
@ -375,7 +374,7 @@ class MainHandler(tornado.web.RequestHandler):
upstream = None
if handler.provider == "nextcloud":
upstream = handler.upstream
upstream = urllib.parse.urljoin(handler.upstream, "download")
else:
upstream = await stream_providers.get_any(handler.upstream, handler.proxy, logger)
if upstream is None: