Fix response value check
These commands were not implemented like this before. At least on the camera i used for testing (RLC-411) the return value was always a list and the status code is an int.
This commit is contained in:
@@ -40,8 +40,8 @@ class DisplayAPIMixin:
|
||||
"osdTime": {"enable": osd_time_enabled, "pos": osd_time_pos}
|
||||
}
|
||||
}}]
|
||||
r_data = self._execute_command('SetOsd', body)
|
||||
if r_data["value"]["rspCode"] == "200":
|
||||
r_data = self._execute_command('SetOsd', body)[0]
|
||||
if r_data["value"]["rspCode"] == 200:
|
||||
return True
|
||||
print("Could not set OSD. Camera responded with status:", r_data["value"])
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user