pyezvizapi 1.0.0.0__py3-none-any.whl → 1.0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyezvizapi might be problematic. Click here for more details.

pyezvizapi/camera.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """pyezvizapi camera api."""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import datetime
@@ -43,7 +44,7 @@ class EzvizCamera:
43
44
 
44
45
  if fetch_nested_value(_alarmlist, ["page", "totalResults"], 0) > 0:
45
46
  self._last_alarm = _alarmlist["alarms"][0]
46
- return self._motion_trigger()
47
+ self._motion_trigger()
47
48
 
48
49
  def _local_ip(self) -> Any:
49
50
  """Fix empty ip value for certain cameras."""
pyezvizapi/utils.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """Decrypt camera images."""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  from hashlib import md5
@@ -85,13 +86,11 @@ def decrypt_image(input_data: bytes, password: str) -> bytes:
85
86
 
86
87
  # check header
87
88
  if input_data[:16] != b"hikencodepicture":
88
- _LOGGER.warning("Image header doesn't contain 'hikencodepicture'")
89
+ _LOGGER.debug("Image header doesn't contain 'hikencodepicture'")
89
90
  return input_data
90
91
 
91
92
  file_hash = input_data[16:48]
92
- passwd_hash = (
93
- md5(str.encode(md5(str.encode(password)).digest().hex())).digest().hex()
94
- )
93
+ passwd_hash = md5(str.encode(md5(str.encode(password)).hexdigest())).hexdigest()
95
94
  if file_hash != str.encode(passwd_hash):
96
95
  raise PyEzvizError("Invalid password")
97
96
 
@@ -114,6 +113,7 @@ def decrypt_image(input_data: bytes, password: str) -> bytes:
114
113
  i += chunk_size
115
114
  return output_data
116
115
 
116
+
117
117
  def deep_merge(dict1, dict2):
118
118
  """Recursively merges two dictionaries, handling lists as well.
119
119
 
@@ -157,4 +157,3 @@ def deep_merge(dict1, dict2):
157
157
  merged[key] = dict2[key]
158
158
 
159
159
  return merged
160
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyezvizapi
3
- Version: 1.0.0.0
3
+ Version: 1.0.0.1
4
4
  Summary: Pilot your Ezviz cameras
5
5
  Home-page: https://github.com/RenierM26/pyEzvizApi/
6
6
  Author: Renier Moorcroft
@@ -1,7 +1,7 @@
1
1
  pyezvizapi/__init__.py,sha256=2YnR6s7OOOpV8QfxI6hdBKfc6WFerT55jqV8A1tDRSs,1167
2
2
  pyezvizapi/__main__.py,sha256=a0JxEmkevYPmWK8V9cHt-7i8MtpztOl2IrrZ2SfEsrM,15718
3
3
  pyezvizapi/api_endpoints.py,sha256=RqfLIOzj7FkzdbIixjhkJajjzmyZmaLjkOxcTOq86n4,2242
4
- pyezvizapi/camera.py,sha256=RazO53-Y1RJeJEaoe9NANvtcZnP1ekFkqNbKaPMEBiA,11014
4
+ pyezvizapi/camera.py,sha256=asP-PNoRPWR2KdlBir2NtLy4UpsLdOXzh2KyRfsir9s,11008
5
5
  pyezvizapi/cas.py,sha256=d31ZflYSD9P40MnsNRNZbT0HVLvlnHokKpLbdAjWQ74,5631
6
6
  pyezvizapi/client.py,sha256=GLId80AGlc75RPzy34zXYd39m5M_QIow4pfLOQtJ-ww,68444
7
7
  pyezvizapi/constants.py,sha256=NWOsr57VIh3t_3it-d6hDVDYHEFiQ2MjupBj6FMte4Y,10049
@@ -9,11 +9,11 @@ pyezvizapi/exceptions.py,sha256=TBJGh12s4UAMVY4k3jibfjEt9D4NVgKnv-397HmfEws,608
9
9
  pyezvizapi/light_bulb.py,sha256=harFSyhnowS9doFjUASI5fcIubE_buRg3c_J2jkY4ho,5028
10
10
  pyezvizapi/mqtt.py,sha256=Y4X99Z0Avm32SE8vog7CNsv6tGUPmPYUZUgPDGS0QJA,7866
11
11
  pyezvizapi/test_cam_rtsp.py,sha256=w7GPcYIeK78TxL8zFDihdGSDQNWcYrurwZOr6uFzzgo,4902
12
- pyezvizapi/utils.py,sha256=5XAv4nfShiOPGyxHJpmZ4XKdg08uKowvkvRN9N5ISdQ,4778
13
- pyezvizapi-1.0.0.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
- pyezvizapi-1.0.0.0.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
- pyezvizapi-1.0.0.0.dist-info/METADATA,sha256=FVj3jLdb48EY5pLRmPNbaGY0N3DgW9PtTvR2q6pX7fA,512
16
- pyezvizapi-1.0.0.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
17
- pyezvizapi-1.0.0.0.dist-info/entry_points.txt,sha256=_BSJ3eNb2H_AZkRdsv1s4mojqWn3N7m503ujvg1SudA,56
18
- pyezvizapi-1.0.0.0.dist-info/top_level.txt,sha256=gMZTelIi8z7pXyTCQLLaIkxVRrDQ_lS2NEv0WgfHrHs,11
19
- pyezvizapi-1.0.0.0.dist-info/RECORD,,
12
+ pyezvizapi/utils.py,sha256=VKtxTVjreIybCp9EAhjJks6ySq4M0HsKpQAoBNDS2io,4755
13
+ pyezvizapi-1.0.0.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
14
+ pyezvizapi-1.0.0.1.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
15
+ pyezvizapi-1.0.0.1.dist-info/METADATA,sha256=_TISRVqLUCWjxfinPUUSrM0sr72RYofJWmDk0_DNe7s,512
16
+ pyezvizapi-1.0.0.1.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
17
+ pyezvizapi-1.0.0.1.dist-info/entry_points.txt,sha256=_BSJ3eNb2H_AZkRdsv1s4mojqWn3N7m503ujvg1SudA,56
18
+ pyezvizapi-1.0.0.1.dist-info/top_level.txt,sha256=gMZTelIi8z7pXyTCQLLaIkxVRrDQ_lS2NEv0WgfHrHs,11
19
+ pyezvizapi-1.0.0.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.7.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5