diff --git a/pyproject.toml b/pyproject.toml index 71f829b..4ac9544 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "androidtvremote2" -version = "0.1.0" +version = "0.1.1" license = {text = "Apache-2.0"} authors = [ { name="tronikos", email="tronikos@gmail.com" }, diff --git a/src/androidtvremote2/androidtv_remote.py b/src/androidtvremote2/androidtv_remote.py index 4897071..27f13c9 100644 --- a/src/androidtvremote2/androidtv_remote.py +++ b/src/androidtvremote2/androidtv_remote.py @@ -6,6 +6,7 @@ from collections.abc import Callable import os import ssl +from urllib.parse import urlparse import aiofiles from cryptography import x509 @@ -397,7 +398,7 @@ def send_launch_app_command(self, app_link_or_app_id: str) -> None: if not self._remote_message_protocol: LOGGER.debug("Called send_launch_app_command after disconnect") raise ConnectionClosed("Called send_launch_app_command after disconnect") - prefix = "" if "://" in app_link_or_app_id else "market://launch?id=" + prefix = "" if urlparse(app_link_or_app_id).scheme else "market://launch?id=" self._remote_message_protocol.send_launch_app_command( f"{prefix}{app_link_or_app_id}" )