androidtvremote2 0.0.15__tar.gz → 0.1.1__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.0.15/src/androidtvremote2.egg-info → androidtvremote2-0.1.1}/PKG-INFO +1 -1
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/pyproject.toml +1 -1
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/androidtv_remote.py +6 -2
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1/src/androidtvremote2.egg-info}/PKG-INFO +1 -1
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/demo.py +6 -3
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/LICENSE +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/README.md +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/setup.cfg +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/__init__.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/base.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/certificate_generator.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/const.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/exceptions.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/pairing.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/polo_pb2.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/polo_pb2.pyi +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/remote.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/remotemessage_pb2.py +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/remotemessage_pb2.pyi +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2.egg-info/SOURCES.txt +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2.egg-info/dependency_links.txt +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2.egg-info/requires.txt +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2.egg-info/top_level.txt +0 -0
- {androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/tests/test_androidtv_remote.py +0 -0
|
@@ -6,6 +6,7 @@ import asyncio
|
|
|
6
6
|
from collections.abc import Callable
|
|
7
7
|
import os
|
|
8
8
|
import ssl
|
|
9
|
+
from urllib.parse import urlparse
|
|
9
10
|
|
|
10
11
|
import aiofiles
|
|
11
12
|
from cryptography import x509
|
|
@@ -387,7 +388,7 @@ class AndroidTVRemote:
|
|
|
387
388
|
raise ConnectionClosed("Called send_key_command after disconnect")
|
|
388
389
|
self._remote_message_protocol.send_key_command(key_code, direction)
|
|
389
390
|
|
|
390
|
-
def send_launch_app_command(self,
|
|
391
|
+
def send_launch_app_command(self, app_link_or_app_id: str) -> None:
|
|
391
392
|
"""Launch an app on Android TV.
|
|
392
393
|
|
|
393
394
|
This does not block; it buffers the data and arranges for it to be sent out asynchronously.
|
|
@@ -397,4 +398,7 @@ class AndroidTVRemote:
|
|
|
397
398
|
if not self._remote_message_protocol:
|
|
398
399
|
LOGGER.debug("Called send_launch_app_command after disconnect")
|
|
399
400
|
raise ConnectionClosed("Called send_launch_app_command after disconnect")
|
|
400
|
-
|
|
401
|
+
prefix = "" if urlparse(app_link_or_app_id).scheme else "market://launch?id="
|
|
402
|
+
self._remote_message_protocol.send_launch_app_command(
|
|
403
|
+
f"{prefix}{app_link_or_app_id}"
|
|
404
|
+
)
|
|
@@ -34,6 +34,7 @@ async def _bind_keyboard(remote: AndroidTVRemote) -> None:
|
|
|
34
34
|
"\n- 'n': Netflix"
|
|
35
35
|
"\n- 'd': Disney+"
|
|
36
36
|
"\n- 'a': Amazon Prime Video"
|
|
37
|
+
"\n- 'k': Kodi"
|
|
37
38
|
"\n- 'q': quit\n\n"
|
|
38
39
|
)
|
|
39
40
|
key_mappings = {
|
|
@@ -77,11 +78,13 @@ async def _bind_keyboard(remote: AndroidTVRemote) -> None:
|
|
|
77
78
|
elif key.char == "y":
|
|
78
79
|
remote.send_launch_app_command("https://www.youtube.com")
|
|
79
80
|
elif key.char == "n":
|
|
80
|
-
remote.send_launch_app_command("
|
|
81
|
+
remote.send_launch_app_command("com.netflix.ninja")
|
|
81
82
|
elif key.char == "d":
|
|
82
|
-
remote.send_launch_app_command("
|
|
83
|
+
remote.send_launch_app_command("com.disney.disneyplus")
|
|
83
84
|
elif key.char == "a":
|
|
84
|
-
remote.send_launch_app_command("
|
|
85
|
+
remote.send_launch_app_command("com.amazon.amazonvideo.livingroom")
|
|
86
|
+
elif key.char == "k":
|
|
87
|
+
remote.send_launch_app_command("org.xbmc.kodi")
|
|
85
88
|
|
|
86
89
|
|
|
87
90
|
async def _host_from_zeroconf(timeout: float) -> str:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/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.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/remotemessage_pb2.py
RENAMED
|
File without changes
|
{androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2/remotemessage_pb2.pyi
RENAMED
|
File without changes
|
{androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2.egg-info/requires.txt
RENAMED
|
File without changes
|
{androidtvremote2-0.0.15 → androidtvremote2-0.1.1}/src/androidtvremote2.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|