uiprotect 6.6.0__tar.gz → 6.6.2__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 uiprotect might be problematic. Click here for more details.
- {uiprotect-6.6.0 → uiprotect-6.6.2}/PKG-INFO +1 -1
- {uiprotect-6.6.0 → uiprotect-6.6.2}/pyproject.toml +2 -2
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/devices.py +15 -16
- {uiprotect-6.6.0 → uiprotect-6.6.2}/LICENSE +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/README.md +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/__init__.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/__main__.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/_compat.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/api.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/__init__.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/backup.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/base.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/cameras.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/chimes.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/doorlocks.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/events.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/lights.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/liveviews.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/nvr.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/sensors.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/cli/viewers.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/__init__.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/base.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/bootstrap.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/convert.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/nvr.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/types.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/user.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/data/websocket.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/exceptions.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/py.typed +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/release_cache.json +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/stream.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/test_util/__init__.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/test_util/anonymize.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/utils.py +0 -0
- {uiprotect-6.6.0 → uiprotect-6.6.2}/src/uiprotect/websocket.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "uiprotect"
|
|
3
|
-
version = "6.6.
|
|
3
|
+
version = "6.6.2"
|
|
4
4
|
description = "Python API for Unifi Protect (Unofficial)"
|
|
5
5
|
authors = ["UI Protect Maintainers <ui@koston.org>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -75,7 +75,7 @@ mkdocs-material = "^9.5.26"
|
|
|
75
75
|
mkdocs-material-extensions = "^1.3.1"
|
|
76
76
|
pymdown-extensions = "^10.8.1"
|
|
77
77
|
mkdocs-git-revision-date-localized-plugin = "^1.2.6"
|
|
78
|
-
mkdocs-include-markdown-plugin = "
|
|
78
|
+
mkdocs-include-markdown-plugin = ">=6.1.1,<8.0.0"
|
|
79
79
|
mkdocstrings = ">=0.25.1,<0.28.0"
|
|
80
80
|
mkdocstrings-python = "^1.10.3"
|
|
81
81
|
|
|
@@ -83,18 +83,7 @@ if TYPE_CHECKING:
|
|
|
83
83
|
from .nvr import Event, Liveview
|
|
84
84
|
|
|
85
85
|
PRIVACY_ZONE_NAME = "pyufp_privacy_zone"
|
|
86
|
-
LUX_MAPPING_VALUES = [
|
|
87
|
-
30,
|
|
88
|
-
25,
|
|
89
|
-
20,
|
|
90
|
-
15,
|
|
91
|
-
12,
|
|
92
|
-
10,
|
|
93
|
-
7,
|
|
94
|
-
5,
|
|
95
|
-
3,
|
|
96
|
-
1,
|
|
97
|
-
]
|
|
86
|
+
LUX_MAPPING_VALUES = [30, 25, 20, 15, 12, 10, 7, 5, 3, 1, 0]
|
|
98
87
|
|
|
99
88
|
_LOGGER = logging.getLogger(__name__)
|
|
100
89
|
|
|
@@ -2024,13 +2013,18 @@ class Camera(ProtectMotionDeviceModel):
|
|
|
2024
2013
|
|
|
2025
2014
|
Datetime of screenshot is approximate. It may be +/- a few seconds.
|
|
2026
2015
|
"""
|
|
2016
|
+
# Use READ_LIVE if dt is None, otherwise READ_MEDIA
|
|
2017
|
+
permission = (
|
|
2018
|
+
PermissionNode.READ_LIVE if dt is None else PermissionNode.READ_MEDIA
|
|
2019
|
+
)
|
|
2027
2020
|
if not self._api.bootstrap.auth_user.can(
|
|
2028
2021
|
ModelType.CAMERA,
|
|
2029
|
-
|
|
2022
|
+
permission,
|
|
2030
2023
|
self,
|
|
2031
2024
|
):
|
|
2025
|
+
action = "read live" if dt is None else "read media"
|
|
2032
2026
|
raise NotAuthorized(
|
|
2033
|
-
f"Do not have permission to
|
|
2027
|
+
f"Do not have permission to {action} for camera: {self.id}"
|
|
2034
2028
|
)
|
|
2035
2029
|
|
|
2036
2030
|
if height is None and width is None and self.high_camera_channel is not None:
|
|
@@ -2052,13 +2046,18 @@ class Camera(ProtectMotionDeviceModel):
|
|
|
2052
2046
|
if not self.feature_flags.has_package_camera:
|
|
2053
2047
|
raise BadRequest("Device does not have package camera")
|
|
2054
2048
|
|
|
2049
|
+
# Use READ_LIVE if dt is None, otherwise READ_MEDIA
|
|
2050
|
+
permission = (
|
|
2051
|
+
PermissionNode.READ_LIVE if dt is None else PermissionNode.READ_MEDIA
|
|
2052
|
+
)
|
|
2055
2053
|
if not self._api.bootstrap.auth_user.can(
|
|
2056
2054
|
ModelType.CAMERA,
|
|
2057
|
-
|
|
2055
|
+
permission,
|
|
2058
2056
|
self,
|
|
2059
2057
|
):
|
|
2058
|
+
action = "read live" if dt is None else "read media"
|
|
2060
2059
|
raise NotAuthorized(
|
|
2061
|
-
f"Do not have permission to
|
|
2060
|
+
f"Do not have permission to {action} for camera: {self.id}"
|
|
2062
2061
|
)
|
|
2063
2062
|
|
|
2064
2063
|
if height is None and width is None and self.package_camera_channel is not None:
|
|
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
|
|
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
|