pyezvizapi 1.0.0.0__tar.gz → 1.0.0.1__tar.gz
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-1.0.0.0/pyezvizapi.egg-info → pyezvizapi-1.0.0.1}/PKG-INFO +1 -1
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/camera.py +2 -1
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/utils.py +4 -5
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1/pyezvizapi.egg-info}/PKG-INFO +1 -1
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/setup.py +1 -1
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/LICENSE +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/LICENSE.md +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/MANIFEST.in +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/README.md +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/__init__.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/__main__.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/api_endpoints.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/cas.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/client.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/constants.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/exceptions.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/light_bulb.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/mqtt.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi/test_cam_rtsp.py +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi.egg-info/SOURCES.txt +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi.egg-info/dependency_links.txt +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi.egg-info/entry_points.txt +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi.egg-info/requires.txt +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/pyezvizapi.egg-info/top_level.txt +0 -0
- {pyezvizapi-1.0.0.0 → pyezvizapi-1.0.0.1}/setup.cfg +0 -0
|
@@ -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
|
-
|
|
47
|
+
self._motion_trigger()
|
|
47
48
|
|
|
48
49
|
def _local_ip(self) -> Any:
|
|
49
50
|
"""Fix empty ip value for certain cameras."""
|
|
@@ -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.
|
|
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
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|