python-swidget 1.2.3__tar.gz → 1.2.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-swidget
3
- Version: 1.2.3
3
+ Version: 1.2.4
4
4
  Summary: Python API for Swidget smart devices
5
5
  Home-page: https://github.com/swidget/python-swidget
6
6
  License: GPL-3.0-or-later
@@ -21,7 +21,7 @@ Requires-Dist: importlib-metadata
21
21
  Requires-Dist: m2r (>=0,<1) ; extra == "docs"
22
22
  Requires-Dist: mistune (<2.0.0) ; extra == "docs"
23
23
  Requires-Dist: pydantic (>=1,<2)
24
- Requires-Dist: requests (==2.31.0)
24
+ Requires-Dist: requests (==2.32.3)
25
25
  Requires-Dist: sphinx (>=4,<5) ; extra == "docs"
26
26
  Requires-Dist: sphinx_rtd_theme (>=0,<1) ; extra == "docs"
27
27
  Requires-Dist: sphinxcontrib-programoutput (>=0,<1) ; extra == "docs"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-swidget"
3
- version = "1.2.3"
3
+ version = "1.2.4"
4
4
  description = "Python API for Swidget smart devices"
5
5
  license = "GPL-3.0-or-later"
6
6
  authors = ["Swidget"]
@@ -22,7 +22,7 @@ importlib-metadata = "*"
22
22
  asyncclick = ">=8"
23
23
  pydantic = "^1"
24
24
  ssdp = "1.1.1"
25
- requests = "2.31.0"
25
+ requests = "2.32.3"
26
26
  types-requests = "2.31.0.6"
27
27
  urllib3 = '1.26.5'
28
28
 
@@ -608,9 +608,14 @@ class SwidgetDevice:
608
608
  if InsertType.VIDEO.value in self.insert_features:
609
609
  try:
610
610
  snapshot_url = self.snapshot_url
611
+ headers = self._session.headers.copy()
612
+ if width is not None and height is not None:
613
+ headers.update(
614
+ {"x-picture-width": str(width), "x-picture-height": str(height)}
615
+ )
611
616
  if isinstance(snapshot_url, str):
612
617
  async with self._session.get(
613
- url=snapshot_url, ssl=False
618
+ url=snapshot_url, headers=headers, ssl=False
614
619
  ) as response:
615
620
  if response.status == 200:
616
621
  return await response.read()
File without changes