float to int

This commit is contained in:
Roy Olav Purser 2021-05-13 16:50:46 +02:00
parent 118ffa16f8
commit 9ed60d46df
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -213,11 +213,11 @@ class MainHandler(tornado.web.RequestHandler):
if isinstance(width_str, str) and isinstance(height_str, str): if isinstance(width_str, str) and isinstance(height_str, str):
pass pass
elif isinstance(width_str, str): elif isinstance(width_str, str):
width = (width // 16) * 16 width = int((width // 16) * 16)
height = (width * 9) / 16 height = int((width * 9) // 16)
elif isinstance(height_str, str): elif isinstance(height_str, str):
height = (height // 9) * 9 height = int((height // 9) * 9)
width = (height * 16) / 9 width = int((height * 16) // 9)
origin = self.request.path origin = self.request.path
if stream_server is not None: if stream_server is not None: