Browse Source

Fix AddUser

master
Dmitry Ermakov 1 year ago
parent
commit
81acf8845d
  1. 6
      dvrip.py

6
dvrip.py

@ -41,7 +41,7 @@ class DVRIPCam(object):
"AddGroup": 1476, "AddGroup": 1476,
"ModifyGroup": 1478, "ModifyGroup": 1478,
"DelGroup": 1480, "DelGroup": 1480,
"AddUser": 1482, "User": 1482,
"ModifyUser": 1484, "ModifyUser": 1484,
"DelUser": 1486, "DelUser": 1486,
"ModifyPassword": 1488, "ModifyPassword": 1488,
@ -393,9 +393,8 @@ class DVRIPCam(object):
return False return False
g = g[0] g = g[0]
data = self.set_command( data = self.set_command(
"AddUser", "User",
{ {
"User": {
"AuthorityList": auth or g["AuthorityList"], "AuthorityList": auth or g["AuthorityList"],
"Group": g["Name"], "Group": g["Name"],
"Memo": comment, "Memo": comment,
@ -404,7 +403,6 @@ class DVRIPCam(object):
"Reserved": False, "Reserved": False,
"Sharable": sharable, "Sharable": sharable,
}, },
},
) )
return data["Ret"] in self.OK_CODES return data["Ret"] in self.OK_CODES

Loading…
Cancel
Save