androidtvremote2 0.2.1__tar.gz → 0.2.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.
- {androidtvremote2-0.2.1/src/androidtvremote2.egg-info → androidtvremote2-0.2.2}/PKG-INFO +1 -1
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/pyproject.toml +1 -1
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/androidtv_remote.py +2 -1
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/remote.py +9 -4
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2/src/androidtvremote2.egg-info}/PKG-INFO +1 -1
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/LICENSE +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/README.md +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/setup.cfg +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/__init__.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/base.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/certificate_generator.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/const.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/exceptions.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/pairing.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/polo_pb2.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/polo_pb2.pyi +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/remotemessage_pb2.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/remotemessage_pb2.pyi +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2.egg-info/SOURCES.txt +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2.egg-info/dependency_links.txt +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2.egg-info/requires.txt +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2.egg-info/top_level.txt +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/demo.py +0 -0
- {androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/tests/test_androidtv_remote.py +0 -0
|
@@ -384,7 +384,8 @@ class AndroidTVRemote:
|
|
|
384
384
|
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
|
|
385
385
|
|
|
386
386
|
:param key_code: int (e.g. 26) or str (e.g. "KEYCODE_POWER" or just "POWER") from the enum
|
|
387
|
-
RemoteKeyCode in remotemessage.proto
|
|
387
|
+
RemoteKeyCode in remotemessage.proto or str prefixed with "text:" to pass
|
|
388
|
+
to send_text.
|
|
388
389
|
:param direction: "SHORT" (default) or "START_LONG" or "END_LONG".
|
|
389
390
|
:raises ValueError: if key_code in str or direction isn't known.
|
|
390
391
|
:raises ConnectionClosed: if client is disconnected.
|
|
@@ -30,6 +30,8 @@ ERROR_SUGGESTION_MSG = (
|
|
|
30
30
|
"On the Android TV device, go to Settings > Apps > See all apps > Show system apps. "
|
|
31
31
|
"Then, select Android TV Remote Service > Storage > Clear data/storage."
|
|
32
32
|
)
|
|
33
|
+
KEYCODE_PREFIX = "KEYCODE_"
|
|
34
|
+
TEXT_PREFIX = "text:"
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
class Feature(IntFlag):
|
|
@@ -102,16 +104,19 @@ class RemoteProtocol(ProtobufProtocol):
|
|
|
102
104
|
|
|
103
105
|
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
|
|
104
106
|
|
|
105
|
-
:param key_code: int (e.g. 26) or str (e.g. KEYCODE_POWER or just "POWER") from the enum
|
|
106
|
-
RemoteKeyCode in remotemessage.proto
|
|
107
|
+
:param key_code: int (e.g. 26) or str (e.g. "KEYCODE_POWER" or just "POWER") from the enum
|
|
108
|
+
RemoteKeyCode in remotemessage.proto or str prefixed with "text:" to pass
|
|
109
|
+
to send_text.
|
|
107
110
|
:param direction: "SHORT" (default) or "START_LONG" or "END_LONG".
|
|
108
111
|
:raises ValueError: if key_code in str or direction isn't known.
|
|
109
112
|
"""
|
|
110
113
|
self._reset_idle_disconnect_task()
|
|
111
114
|
msg = RemoteMessage()
|
|
112
115
|
if isinstance(key_code, str):
|
|
113
|
-
if
|
|
114
|
-
|
|
116
|
+
if key_code.lower().startswith(TEXT_PREFIX):
|
|
117
|
+
return self.send_text(key_code[len(TEXT_PREFIX):])
|
|
118
|
+
if not key_code.startswith(KEYCODE_PREFIX):
|
|
119
|
+
key_code = KEYCODE_PREFIX + key_code
|
|
115
120
|
key_code = RemoteKeyCode.Value(key_code)
|
|
116
121
|
if isinstance(direction, str):
|
|
117
122
|
direction = RemoteDirection.Value(direction)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/certificate_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2/remotemessage_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
{androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2.egg-info/requires.txt
RENAMED
|
File without changes
|
{androidtvremote2-0.2.1 → androidtvremote2-0.2.2}/src/androidtvremote2.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|