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)
|
||||
except NoDataError:
|
||||
self.set_status(404)
|
||||
self.write("HTML template missing.")
|
||||
self.write("Video not found.")
|
||||
except MissingTemplateError:
|
||||
self.set_status(404)
|
||||
self.write("Video not found.")
|
||||
self.write("HTML template missing.")
|
||||
|
||||
async def handle_render(self, handler):
|
||||
try:
|
||||
video_info, meta, title = await self.get_data(handler)
|
||||
except NoDataError:
|
||||
self.set_status(404)
|
||||
self.write("HTML template missing.")
|
||||
self.write("Video not found.")
|
||||
return
|
||||
except MissingTemplateError:
|
||||
self.set_status(404)
|
||||
self.write("Video not found.")
|
||||
self.write("HTML template missing.")
|
||||
return
|
||||
|
||||
script = config.template_script.generate(info=json.dumps(video_info))
|
||||
|
Loading…
Reference in New Issue
Block a user