webcam: fixed rotation param

Signed-off-by: Grant Harding gharding@gmail.com
This commit is contained in:
Grant Harding 2022-08-28 11:16:02 -04:00 committed by GitHub
parent e3cafb58bc
commit 78605db001
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -338,9 +338,9 @@ class WebCam:
webcam["flip_vertical"] = web_request.get_boolean(
"flip_vertical", False
)
webcam["rotation"] = web_request.get_str("rotation", 0)
webcam["rotation"] = web_request.get_int("rotation", 0)
if webcam["rotation"] not in [0, 90, 180, 270]:
raise server.error("Invalid value for parameter 'rotate'")
raise server.error("Invalid value for parameter 'rotation'")
webcam["source"] = "database"
return cls(server, **webcam)