lghorizon 0.8.0b2__tar.gz → 0.9.0.dev4__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.
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/.github/workflows/build-on-pr.yml +1 -1
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/.github/workflows/publish-to-pypi.yml +3 -3
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/PKG-INFO +15 -3
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon/const.py +9 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon/lghorizon_api.py +1 -3
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon/models.py +17 -9
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon.egg-info/PKG-INFO +15 -3
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon.egg-info/requires.txt +1 -1
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/secrets_stub.json +2 -2
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/setup.py +1 -1
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/.coverage +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/.flake8 +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/.gitignore +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/LICENSE +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/README.md +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/instructions.txt +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon/__init__.py +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon/exceptions.py +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon/helpers.py +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon/py.typed +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon.egg-info/SOURCES.txt +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon.egg-info/dependency_links.txt +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon.egg-info/not-zip-safe +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lghorizon.egg-info/top_level.txt +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/lib64 +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/pyvenv.cfg +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/renovate.json +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/setup.cfg +0 -0
- {lghorizon-0.8.0b2 → lghorizon-0.9.0.dev4}/test.py +0 -0
|
@@ -7,12 +7,14 @@ jobs:
|
|
|
7
7
|
build-n-publish:
|
|
8
8
|
name: Publish Python 🐍 distribution 📦 to Pypi
|
|
9
9
|
runs-on: ubuntu-24.04
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write
|
|
10
12
|
steps:
|
|
11
13
|
- uses: actions/checkout@master
|
|
12
14
|
- name: Set up Python 3.10
|
|
13
15
|
uses: actions/setup-python@v5
|
|
14
16
|
with:
|
|
15
|
-
python-version: '3.
|
|
17
|
+
python-version: '3.13'
|
|
16
18
|
|
|
17
19
|
- name: Install pypa/build
|
|
18
20
|
run: >-
|
|
@@ -29,5 +31,3 @@ jobs:
|
|
|
29
31
|
--outdir dist/
|
|
30
32
|
- name: Publish distribution 📦 to PyPI
|
|
31
33
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
32
|
-
with:
|
|
33
|
-
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: lghorizon
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0.dev4
|
|
4
4
|
Summary: Python client for Liberty Global Horizon settop boxes
|
|
5
5
|
Home-page: https://github.com/sholofly/LGHorizon-python
|
|
6
6
|
Author: Rudolf Offereins
|
|
@@ -20,9 +20,21 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
20
20
|
Requires-Python: >=3.9
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: paho-mqtt
|
|
23
|
+
Requires-Dist: paho-mqtt
|
|
24
24
|
Requires-Dist: requests>=2.22.0
|
|
25
25
|
Requires-Dist: backoff>=1.9.0
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: author-email
|
|
28
|
+
Dynamic: classifier
|
|
29
|
+
Dynamic: description
|
|
30
|
+
Dynamic: description-content-type
|
|
31
|
+
Dynamic: home-page
|
|
32
|
+
Dynamic: keywords
|
|
33
|
+
Dynamic: license
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: requires-python
|
|
37
|
+
Dynamic: summary
|
|
26
38
|
|
|
27
39
|
# LG Horizon Api
|
|
28
40
|
|
|
@@ -76,6 +76,15 @@ COUNTRY_SETTINGS = {
|
|
|
76
76
|
"channels": [],
|
|
77
77
|
"language": "de",
|
|
78
78
|
},
|
|
79
|
+
"be-basetv": {
|
|
80
|
+
"api_url": "https://spark-prod-be.gnp.cloud.base.tv",
|
|
81
|
+
"channels": [],
|
|
82
|
+
"language": "nl",
|
|
83
|
+
"platform_types": {
|
|
84
|
+
"EOS": {"manufacturer": "Arris", "model": "DCX960"},
|
|
85
|
+
"HORIZON": {"manufacturer": "Arris", "model": "VIP5002W"},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
79
88
|
"be-nl": {
|
|
80
89
|
"api_url": "https://spark-prod-be.gnp.cloud.telenet.tv",
|
|
81
90
|
"oauth_username_fieldname": "j_username",
|
|
@@ -93,9 +93,7 @@ class LGHorizonApi:
|
|
|
93
93
|
|
|
94
94
|
def _authorize(self) -> None:
|
|
95
95
|
ctry_code = self._country_code[0:2]
|
|
96
|
-
if ctry_code
|
|
97
|
-
self._authorize_telenet()
|
|
98
|
-
elif ctry_code in ("gb", "ch"):
|
|
96
|
+
if ctry_code in ("gb", "ch", "be"):
|
|
99
97
|
self._authorize_with_refresh_token()
|
|
100
98
|
else:
|
|
101
99
|
self._authorize_default()
|
|
@@ -293,11 +293,17 @@ class LGHorizonRecordingListSeasonShow(LGHorizonBaseRecording):
|
|
|
293
293
|
def __init__(self, recording_season_json):
|
|
294
294
|
"""Init the single recording."""
|
|
295
295
|
|
|
296
|
+
poster_url = None
|
|
297
|
+
if (
|
|
298
|
+
"poster" in recording_season_json
|
|
299
|
+
and "url" in recording_season_json["poster"]
|
|
300
|
+
):
|
|
301
|
+
poster_url = recording_season_json["poster"]["url"]
|
|
296
302
|
LGHorizonBaseRecording.__init__(
|
|
297
303
|
self,
|
|
298
304
|
recording_season_json["id"],
|
|
299
305
|
recording_season_json["title"],
|
|
300
|
-
|
|
306
|
+
poster_url,
|
|
301
307
|
recording_season_json["channelId"],
|
|
302
308
|
recording_season_json["type"],
|
|
303
309
|
)
|
|
@@ -360,7 +366,6 @@ class LGHorizonMqttClient:
|
|
|
360
366
|
)
|
|
361
367
|
self.client_id = make_id()
|
|
362
368
|
self._mqtt_client = mqtt.Client(
|
|
363
|
-
mqtt.CallbackAPIVersion.VERSION1,
|
|
364
369
|
client_id=self.client_id,
|
|
365
370
|
transport="websockets",
|
|
366
371
|
)
|
|
@@ -657,7 +662,7 @@ class LGHorizonBox:
|
|
|
657
662
|
'{"id":"'
|
|
658
663
|
+ make_id(8)
|
|
659
664
|
+ '","type":"CPE.pushToTV","source":{"clientId":"'
|
|
660
|
-
+ self._mqtt_client.
|
|
665
|
+
+ self._mqtt_client.client_id
|
|
661
666
|
+ '","friendlyDeviceName":"Home Assistant"},'
|
|
662
667
|
+ '"status":{"sourceType":"linear","source":{"channelId":"'
|
|
663
668
|
+ channel.id
|
|
@@ -674,7 +679,7 @@ class LGHorizonBox:
|
|
|
674
679
|
'{"id":"'
|
|
675
680
|
+ make_id(8)
|
|
676
681
|
+ '","type":"CPE.pushToTV","source":{"clientId":"'
|
|
677
|
-
+ self._mqtt_client.
|
|
682
|
+
+ self._mqtt_client.client_id
|
|
678
683
|
+ '","friendlyDeviceName":"Home Assistant"},'
|
|
679
684
|
+ '"status":{"sourceType":"nDVR","source":{"recordingId":"'
|
|
680
685
|
+ recording_id
|
|
@@ -686,11 +691,14 @@ class LGHorizonBox:
|
|
|
686
691
|
|
|
687
692
|
def send_key_to_box(self, key: str) -> None:
|
|
688
693
|
"""Send emulated (remote) key press to settopbox."""
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
+
payload_dict = {
|
|
695
|
+
"type": "CPE.KeyEvent",
|
|
696
|
+
"runtimeType": "key",
|
|
697
|
+
"id": "ha",
|
|
698
|
+
"source": self.device_id.lower(),
|
|
699
|
+
"status": {"w3cKey": key, "eventType": "keyDownUp"},
|
|
700
|
+
}
|
|
701
|
+
payload = json.dumps(payload_dict)
|
|
694
702
|
self._mqtt_client.publish_message(
|
|
695
703
|
f"{self._auth.household_id}/{self.device_id}", payload
|
|
696
704
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: lghorizon
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0.dev4
|
|
4
4
|
Summary: Python client for Liberty Global Horizon settop boxes
|
|
5
5
|
Home-page: https://github.com/sholofly/LGHorizon-python
|
|
6
6
|
Author: Rudolf Offereins
|
|
@@ -20,9 +20,21 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
20
20
|
Requires-Python: >=3.9
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
|
-
Requires-Dist: paho-mqtt
|
|
23
|
+
Requires-Dist: paho-mqtt
|
|
24
24
|
Requires-Dist: requests>=2.22.0
|
|
25
25
|
Requires-Dist: backoff>=1.9.0
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: author-email
|
|
28
|
+
Dynamic: classifier
|
|
29
|
+
Dynamic: description
|
|
30
|
+
Dynamic: description-content-type
|
|
31
|
+
Dynamic: home-page
|
|
32
|
+
Dynamic: keywords
|
|
33
|
+
Dynamic: license
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: requires-python
|
|
37
|
+
Dynamic: summary
|
|
26
38
|
|
|
27
39
|
# LG Horizon Api
|
|
28
40
|
|
|
@@ -27,7 +27,7 @@ setuptools.setup(
|
|
|
27
27
|
url="https://github.com/sholofly/LGHorizon-python",
|
|
28
28
|
packages=setuptools.find_packages(include=["lghorizon"]),
|
|
29
29
|
license="MIT license",
|
|
30
|
-
install_requires=["paho-mqtt
|
|
30
|
+
install_requires=["paho-mqtt", "requests>=2.22.0", "backoff>=1.9.0"],
|
|
31
31
|
keywords=["LG", "Horizon", "API", "Settop box"],
|
|
32
32
|
classifiers=[
|
|
33
33
|
"Development Status :: 3 - Alpha",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|