uiprotect 7.5.5__tar.gz → 7.6.0__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.

Files changed (38) hide show
  1. {uiprotect-7.5.5 → uiprotect-7.6.0}/PKG-INFO +1 -1
  2. {uiprotect-7.5.5 → uiprotect-7.6.0}/pyproject.toml +18 -17
  3. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/stream.py +12 -1
  4. {uiprotect-7.5.5 → uiprotect-7.6.0}/LICENSE +0 -0
  5. {uiprotect-7.5.5 → uiprotect-7.6.0}/README.md +0 -0
  6. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/__init__.py +0 -0
  7. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/__main__.py +0 -0
  8. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/_compat.py +0 -0
  9. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/api.py +0 -0
  10. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/__init__.py +0 -0
  11. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/aiports.py +0 -0
  12. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/backup.py +0 -0
  13. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/base.py +0 -0
  14. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/cameras.py +0 -0
  15. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/chimes.py +0 -0
  16. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/doorlocks.py +0 -0
  17. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/events.py +0 -0
  18. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/lights.py +0 -0
  19. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/liveviews.py +0 -0
  20. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/nvr.py +0 -0
  21. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/sensors.py +0 -0
  22. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/cli/viewers.py +0 -0
  23. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/__init__.py +0 -0
  24. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/base.py +0 -0
  25. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/bootstrap.py +0 -0
  26. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/convert.py +0 -0
  27. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/devices.py +0 -0
  28. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/nvr.py +0 -0
  29. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/types.py +0 -0
  30. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/user.py +0 -0
  31. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/data/websocket.py +0 -0
  32. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/exceptions.py +0 -0
  33. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/py.typed +0 -0
  34. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/release_cache.json +0 -0
  35. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/test_util/__init__.py +0 -0
  36. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/test_util/anonymize.py +0 -0
  37. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/utils.py +0 -0
  38. {uiprotect-7.5.5 → uiprotect-7.6.0}/src/uiprotect/websocket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: uiprotect
3
- Version: 7.5.5
3
+ Version: 7.6.0
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  License: MIT
6
6
  Author: UI Protect Maintainers
@@ -1,12 +1,23 @@
1
- [tool.poetry]
1
+ [project]
2
2
  name = "uiprotect"
3
- version = "7.5.5"
3
+ version = "7.6.0"
4
4
  license = "MIT"
5
5
  description = "Python API for Unifi Protect (Unofficial)"
6
- authors = ["UI Protect Maintainers <ui@koston.org>"]
6
+ authors = [{ name = "UI Protect Maintainers", email = "ui@koston.org" }]
7
7
  readme = "README.md"
8
- repository = "https://github.com/uilibs/uiprotect"
9
- documentation = "https://uiprotect.readthedocs.io"
8
+ requires-python = ">=3.10"
9
+ dynamic = ["classifiers", "dependencies"]
10
+
11
+ [project.urls]
12
+ "Repository" = "https://github.com/uilibs/uiprotect"
13
+ "Documentation" = "https://uiprotect.readthedocs.io"
14
+ "Bug Tracker" = "https://github.com/uilibs/uiprotect/issues"
15
+ "Changelog" = "https://github.com/uilibs/uiprotect/blob/main/CHANGELOG.md"
16
+
17
+ [project.scripts]
18
+ uiprotect = "uiprotect.cli:app"
19
+
20
+ [tool.poetry]
10
21
  classifiers = [
11
22
  "Intended Audience :: Developers",
12
23
  "Natural Language :: English",
@@ -14,21 +25,11 @@ classifiers = [
14
25
  "Topic :: Software Development :: Libraries",
15
26
  "Topic :: Software Development :: Build Tools",
16
27
  "Development Status :: 5 - Production/Stable",
17
- "Programming Language :: Python :: 3.10",
18
- "Programming Language :: Python :: 3.11",
19
- "Programming Language :: Python :: 3.12",
20
28
  ]
21
29
  packages = [
22
30
  { include = "uiprotect", from = "src" },
23
31
  ]
24
32
 
25
- [tool.poetry.urls]
26
- "Bug Tracker" = "https://github.com/uilibs/uiprotect/issues"
27
- "Changelog" = "https://github.com/uilibs/uiprotect/blob/main/CHANGELOG.md"
28
-
29
- [tool.poetry.scripts]
30
- uiprotect = "uiprotect.cli:app"
31
-
32
33
  [tool.poetry.dependencies]
33
34
  python = ">=3.10"
34
35
  rich = ">=10"
@@ -81,7 +82,7 @@ mkdocstrings = ">=0.25.1,<0.30.0"
81
82
  mkdocstrings-python = "^1.10.3"
82
83
 
83
84
  [tool.semantic_release]
84
- version_toml = ["pyproject.toml:tool.poetry.version"]
85
+ version_toml = ["pyproject.toml:project.version"]
85
86
  version_variables = [
86
87
  "src/uiprotect/__init__.py:__version__",
87
88
  "docs/conf.py:release",
@@ -205,5 +206,5 @@ module = "docs.*"
205
206
  ignore_errors = true
206
207
 
207
208
  [build-system]
208
- requires = ["poetry-core>=1.0.0"]
209
+ requires = ["poetry-core>=2.1.0"]
209
210
  build-backend = "poetry.core.masonry.api"
@@ -18,6 +18,12 @@ if TYPE_CHECKING:
18
18
 
19
19
  _LOGGER = logging.getLogger(__name__)
20
20
 
21
+ CODEC_TO_ENCODER = {
22
+ "aac": "aac",
23
+ "opus": "libopus",
24
+ "vorbis": "libvorbis",
25
+ }
26
+
21
27
 
22
28
  class FfmpegCommand:
23
29
  ffmpeg_path: Path | None
@@ -130,6 +136,11 @@ class TalkbackStream(FfmpegCommand):
130
136
  if len(input_args) > 0:
131
137
  input_args += " "
132
138
 
139
+ codec = camera.talkback_settings.type_fmt.value
140
+ encoder = CODEC_TO_ENCODER.get(codec)
141
+ if encoder is None:
142
+ raise ValueError(f"Unsupported codec: {codec}")
143
+
133
144
  # vn = no video
134
145
  # acodec = audio codec to encode output in (aac)
135
146
  # ac = number of output channels (1)
@@ -138,7 +149,7 @@ class TalkbackStream(FfmpegCommand):
138
149
  cmd = (
139
150
  "-loglevel info -hide_banner "
140
151
  f'{input_args}-i "{content_url}" -vn '
141
- f"-acodec {camera.talkback_settings.type_fmt.value} -ac {camera.talkback_settings.channels} "
152
+ f"-acodec {encoder} -ac {camera.talkback_settings.channels} "
142
153
  f"-ar {camera.talkback_settings.sampling_rate} -b:a {camera.talkback_settings.sampling_rate} -map 0:a "
143
154
  f'-f adts "udp://{camera.host}:{camera.talkback_settings.bind_port}?bitrate={camera.talkback_settings.sampling_rate}"'
144
155
  )
File without changes
File without changes