From 81acf8845d7892be5b9ecb1ee92ebbe0a1c3ef5a Mon Sep 17 00:00:00 2001 From: Dmitry Ermakov Date: Fri, 5 Apr 2024 11:47:16 +0300 Subject: [PATCH] Fix AddUser --- dvrip.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/dvrip.py b/dvrip.py index 2b51669..6c28c85 100644 --- a/dvrip.py +++ b/dvrip.py @@ -41,7 +41,7 @@ class DVRIPCam(object): "AddGroup": 1476, "ModifyGroup": 1478, "DelGroup": 1480, - "AddUser": 1482, + "User": 1482, "ModifyUser": 1484, "DelUser": 1486, "ModifyPassword": 1488, @@ -393,17 +393,15 @@ class DVRIPCam(object): return False g = g[0] data = self.set_command( - "AddUser", + "User", { - "User": { - "AuthorityList": auth or g["AuthorityList"], - "Group": g["Name"], - "Memo": comment, - "Name": name, - "Password": self.sofia_hash(password), - "Reserved": False, - "Sharable": sharable, - }, + "AuthorityList": auth or g["AuthorityList"], + "Group": g["Name"], + "Memo": comment, + "Name": name, + "Password": self.sofia_hash(password), + "Reserved": False, + "Sharable": sharable, }, ) return data["Ret"] in self.OK_CODES