pylgnetcast
Advanced tools
+1
-1
| Metadata-Version: 2.1 | ||
| Name: pylgnetcast | ||
| Version: 0.3.8 | ||
| Version: 0.3.9 | ||
| Summary: Client for the LG Smart TV running NetCast 3 or 4. | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/Drafteed/python-lgnetcast |
| Metadata-Version: 2.1 | ||
| Name: pylgnetcast | ||
| Version: 0.3.8 | ||
| Version: 0.3.9 | ||
| Summary: Client for the LG Smart TV running NetCast 3 or 4. | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/Drafteed/python-lgnetcast |
@@ -161,2 +161,24 @@ """ | ||
| def query_device_info(self): | ||
| """Get model information about the TV.""" | ||
| # We're using UDAP to retrieve this information, which requires a specific User-Agent. | ||
| # As self.HEADER is a class variable, we will make a copy to ensure we don't interfere | ||
| # with other instances | ||
| try: | ||
| self.HEADER = {**self.HEADER, "User-Agent": "UDAP/2.0"} | ||
| response = self._send_to_tv("data", payload={"target": "rootservice.xml"}) | ||
| finally: | ||
| # Remove the instance version of self.HEADER to restore original functionality | ||
| del self.HEADER | ||
| if response.status_code != requests.codes.ok: | ||
| return None | ||
| data = response.text | ||
| tree = ElementTree.fromstring(data.encode("utf-8")) | ||
| return { | ||
| "uuid": tree.findtext("device/uuid"), | ||
| "model_name": tree.findtext("device/modelName"), | ||
| "friendly_name": tree.findtext("device/friendlyName") | ||
| } | ||
| def change_input_source(self, type, index): | ||
@@ -163,0 +185,0 @@ """Send change input source command to the TV.""" |
+1
-1
@@ -10,3 +10,3 @@ from setuptools import setup | ||
| name='pylgnetcast', | ||
| version='0.3.8', | ||
| version='0.3.9', | ||
| maintainer='Artem Draft', | ||
@@ -13,0 +13,0 @@ maintainer_email='artemon_93@mail.ru', |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
20048
5.16%325
6.56%