This commit is contained in:
parent
52f51bc6d5
commit
9294cd54ed
@ -150,21 +150,21 @@ class MainHandler(tornado.web.RequestHandler):
|
|||||||
self.redirect(url=video_info["upstream"], status=303)
|
self.redirect(url=video_info["upstream"], status=303)
|
||||||
except NoDataError:
|
except NoDataError:
|
||||||
self.set_status(404)
|
self.set_status(404)
|
||||||
self.write("HTML template missing.")
|
self.write("Video not found.")
|
||||||
except MissingTemplateError:
|
except MissingTemplateError:
|
||||||
self.set_status(404)
|
self.set_status(404)
|
||||||
self.write("Video not found.")
|
self.write("HTML template missing.")
|
||||||
|
|
||||||
async def handle_render(self, handler):
|
async def handle_render(self, handler):
|
||||||
try:
|
try:
|
||||||
video_info, meta, title = await self.get_data(handler)
|
video_info, meta, title = await self.get_data(handler)
|
||||||
except NoDataError:
|
except NoDataError:
|
||||||
self.set_status(404)
|
self.set_status(404)
|
||||||
self.write("HTML template missing.")
|
self.write("Video not found.")
|
||||||
return
|
return
|
||||||
except MissingTemplateError:
|
except MissingTemplateError:
|
||||||
self.set_status(404)
|
self.set_status(404)
|
||||||
self.write("Video not found.")
|
self.write("HTML template missing.")
|
||||||
return
|
return
|
||||||
|
|
||||||
script = config.template_script.generate(info=json.dumps(video_info))
|
script = config.template_script.generate(info=json.dumps(video_info))
|
||||||
|
Loading…
Reference in New Issue
Block a user