aioamazondevices 3.0.8__tar.gz → 3.0.10__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.
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/PKG-INFO +1 -1
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/pyproject.toml +1 -1
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/src/aioamazondevices/__init__.py +1 -1
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/src/aioamazondevices/api.py +3 -2
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/src/aioamazondevices/const.py +7 -2
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/LICENSE +0 -0
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/README.md +0 -0
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/src/aioamazondevices/exceptions.py +0 -0
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/src/aioamazondevices/py.typed +0 -0
- {aioamazondevices-3.0.8 → aioamazondevices-3.0.10}/src/aioamazondevices/sounds.py +0 -0
@@ -34,6 +34,7 @@ from .const import (
|
|
34
34
|
CSRF_COOKIE,
|
35
35
|
DEFAULT_ASSOC_HANDLE,
|
36
36
|
DEFAULT_HEADERS,
|
37
|
+
DEVICE_TO_IGNORE,
|
37
38
|
DEVICE_TYPE_TO_MODEL,
|
38
39
|
DOMAIN_BY_ISO3166_COUNTRY,
|
39
40
|
HTML_EXTENSION,
|
@@ -303,7 +304,7 @@ class AmazonEchoApi:
|
|
303
304
|
headers.update(csrf)
|
304
305
|
|
305
306
|
if json_data:
|
306
|
-
json_header = {"Content-Type": "application/json"}
|
307
|
+
json_header = {"Content-Type": "application/json; charset=utf-8"}
|
307
308
|
_LOGGER.debug("Adding %s to headers", json_header)
|
308
309
|
headers.update(json_header)
|
309
310
|
|
@@ -610,7 +611,7 @@ class AmazonEchoApi:
|
|
610
611
|
# Remove stale, orphaned and virtual devices
|
611
612
|
if (
|
612
613
|
NODE_DEVICES not in device
|
613
|
-
or devices_node.get("deviceType")
|
614
|
+
or devices_node.get("deviceType") in DEVICE_TO_IGNORE
|
614
615
|
):
|
615
616
|
continue
|
616
617
|
|
@@ -20,7 +20,6 @@ DOMAIN_BY_ISO3166_COUNTRY = {
|
|
20
20
|
},
|
21
21
|
"jp": {
|
22
22
|
"domain": "co.jp",
|
23
|
-
"openid.assoc_handle": "jpflex",
|
24
23
|
},
|
25
24
|
"br": {
|
26
25
|
"domain": "com.br",
|
@@ -41,8 +40,9 @@ DEFAULT_HEADERS = {
|
|
41
40
|
f"Mozilla/5.0 (iPhone; CPU iPhone OS {AMAZON_CLIENT_OS.replace('.', '_')} like Mac OS X) " # noqa: E501
|
42
41
|
"AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
|
43
42
|
),
|
44
|
-
"Accept-
|
43
|
+
"Accept-Charset": "utf-8",
|
45
44
|
"Accept-Encoding": "gzip",
|
45
|
+
"Accept-Language": "en-US",
|
46
46
|
"Connection": "keep-alive",
|
47
47
|
}
|
48
48
|
CSRF_COOKIE = "csrf"
|
@@ -67,6 +67,11 @@ BIN_EXTENSION = ".bin"
|
|
67
67
|
|
68
68
|
SPEAKER_GROUP_MODEL = "Speaker Group"
|
69
69
|
|
70
|
+
DEVICE_TO_IGNORE: list[str] = [
|
71
|
+
AMAZON_DEVICE_TYPE, # Alexa App for Mobile
|
72
|
+
"A1RTAM01W29CUP", # Alexa App for PC
|
73
|
+
]
|
74
|
+
|
70
75
|
DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
|
71
76
|
"A10A33FOX2NUBK": {
|
72
77
|
"model": "Echo Spot",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|