androidtvremote2 0.0.15__tar.gz → 0.1.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.
Files changed (24) hide show
  1. {androidtvremote2-0.0.15/src/androidtvremote2.egg-info → androidtvremote2-0.1.0}/PKG-INFO +1 -1
  2. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/pyproject.toml +1 -1
  3. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/androidtv_remote.py +5 -2
  4. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0/src/androidtvremote2.egg-info}/PKG-INFO +1 -1
  5. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/demo.py +6 -3
  6. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/LICENSE +0 -0
  7. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/README.md +0 -0
  8. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/setup.cfg +0 -0
  9. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/__init__.py +0 -0
  10. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/base.py +0 -0
  11. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/certificate_generator.py +0 -0
  12. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/const.py +0 -0
  13. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/exceptions.py +0 -0
  14. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/pairing.py +0 -0
  15. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/polo_pb2.py +0 -0
  16. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/polo_pb2.pyi +0 -0
  17. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/remote.py +0 -0
  18. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/remotemessage_pb2.py +0 -0
  19. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2/remotemessage_pb2.pyi +0 -0
  20. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2.egg-info/SOURCES.txt +0 -0
  21. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2.egg-info/dependency_links.txt +0 -0
  22. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2.egg-info/requires.txt +0 -0
  23. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/src/androidtvremote2.egg-info/top_level.txt +0 -0
  24. {androidtvremote2-0.0.15 → androidtvremote2-0.1.0}/tests/test_androidtv_remote.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: androidtvremote2
3
- Version: 0.0.15
3
+ Version: 0.1.0
4
4
  Summary: A Python library for interacting with Android TV using the Android TV Remote protocol v2
5
5
  Author-email: tronikos <tronikos@gmail.com>
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "androidtvremote2"
3
- version = "0.0.15"
3
+ version = "0.1.0"
4
4
  license = {text = "Apache-2.0"}
5
5
  authors = [
6
6
  { name="tronikos", email="tronikos@gmail.com" },
@@ -387,7 +387,7 @@ class AndroidTVRemote:
387
387
  raise ConnectionClosed("Called send_key_command after disconnect")
388
388
  self._remote_message_protocol.send_key_command(key_code, direction)
389
389
 
390
- def send_launch_app_command(self, app_link: str) -> None:
390
+ def send_launch_app_command(self, app_link_or_app_id: str) -> None:
391
391
  """Launch an app on Android TV.
392
392
 
393
393
  This does not block; it buffers the data and arranges for it to be sent out asynchronously.
@@ -397,4 +397,7 @@ class AndroidTVRemote:
397
397
  if not self._remote_message_protocol:
398
398
  LOGGER.debug("Called send_launch_app_command after disconnect")
399
399
  raise ConnectionClosed("Called send_launch_app_command after disconnect")
400
- self._remote_message_protocol.send_launch_app_command(app_link)
400
+ prefix = "" if "://" in app_link_or_app_id else "market://launch?id="
401
+ self._remote_message_protocol.send_launch_app_command(
402
+ f"{prefix}{app_link_or_app_id}"
403
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: androidtvremote2
3
- Version: 0.0.15
3
+ Version: 0.1.0
4
4
  Summary: A Python library for interacting with Android TV using the Android TV Remote protocol v2
5
5
  Author-email: tronikos <tronikos@gmail.com>
6
6
  License: Apache-2.0
@@ -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("https://www.netflix.com/title")
81
+ remote.send_launch_app_command("com.netflix.ninja")
81
82
  elif key.char == "d":
82
- remote.send_launch_app_command("https://www.disneyplus.com")
83
+ remote.send_launch_app_command("com.disney.disneyplus")
83
84
  elif key.char == "a":
84
- remote.send_launch_app_command("https://app.primevideo.com")
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: