lghorizon 0.6.7__py3-none-any.whl → 0.6.9__py3-none-any.whl
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/const.py +22 -86
- lghorizon/lghorizon_api.py +7 -5
- {lghorizon-0.6.7.dist-info → lghorizon-0.6.9.dist-info}/METADATA +1 -1
- lghorizon-0.6.9.dist-info/RECORD +12 -0
- lghorizon-0.6.7.dist-info/RECORD +0 -12
- {lghorizon-0.6.7.dist-info → lghorizon-0.6.9.dist-info}/LICENSE +0 -0
- {lghorizon-0.6.7.dist-info → lghorizon-0.6.9.dist-info}/WHEEL +0 -0
- {lghorizon-0.6.7.dist-info → lghorizon-0.6.9.dist-info}/top_level.txt +0 -0
lghorizon/const.py
CHANGED
|
@@ -69,12 +69,14 @@ COUNTRY_SETTINGS = {
|
|
|
69
69
|
"APOLLO": {"manufacturer": "Arris", "model": "VIP5002W"},
|
|
70
70
|
},
|
|
71
71
|
"language": "nl",
|
|
72
|
+
"use_legacy_auth": False,
|
|
72
73
|
},
|
|
73
74
|
"ch": {
|
|
74
75
|
"api_url": "https://prod.spark.sunrisetv.ch",
|
|
75
76
|
"use_oauth": False,
|
|
76
77
|
"channels": [],
|
|
77
78
|
"language": "de",
|
|
79
|
+
"use_legacy_auth": True,
|
|
78
80
|
},
|
|
79
81
|
"be-nl": {
|
|
80
82
|
"api_url": "https://spark-prod-be.gnp.cloud.telenet.tv",
|
|
@@ -95,69 +97,37 @@ COUNTRY_SETTINGS = {
|
|
|
95
97
|
"EOS2": {"manufacturer": "HUMAX", "model": "2008C-STB-TN"},
|
|
96
98
|
},
|
|
97
99
|
"language": "nl",
|
|
100
|
+
"use_legacy_auth": False,
|
|
101
|
+
},
|
|
102
|
+
"be-nl-preprod": {
|
|
103
|
+
"api_url": "https://spark-preprod-be.gnp.cloud.telenet.tv",
|
|
104
|
+
"use_oauth": True,
|
|
105
|
+
"oauth_username_fieldname": "j_username",
|
|
106
|
+
"oauth_password_fieldname": "j_password",
|
|
107
|
+
"oauth_add_accept_header": False,
|
|
108
|
+
"oauth_url": "https://login.prd.telenet.be/openid/login.do",
|
|
109
|
+
"oauth_quote_login": False,
|
|
110
|
+
"oauth_redirect_header": "Location",
|
|
111
|
+
"channels": [
|
|
112
|
+
{"channelId": "netflix", "channelName": "Netflix", "channelNumber": "600"},
|
|
113
|
+
{"channelId": "youtube", "channelName": "Youtube", "channelNumber": "-1"},
|
|
114
|
+
],
|
|
115
|
+
"use_legacy_auth": False,
|
|
98
116
|
},
|
|
99
|
-
# "be-nl-preprod": {
|
|
100
|
-
# "api_url": "https://web-api-preprod-obo.horizon.tv/oesp/v4/BE/nld/web",
|
|
101
|
-
# "personalization_url_format": "https://preprod.spark.telenettv.be/nld/web/personalization-service/v1/customer/{household_id}/devices",
|
|
102
|
-
# "mqtt_url": "obomsg.preprod.be.horizon.tv",
|
|
103
|
-
# "use_oauth": True,
|
|
104
|
-
# "oauth_username_fieldname": "j_username",
|
|
105
|
-
# "oauth_password_fieldname": "j_password",
|
|
106
|
-
# "oauth_add_accept_header": False,
|
|
107
|
-
# "oauth_url": "https://login.prd.telenet.be/openid/login.do",
|
|
108
|
-
# "oauth_quote_login": False,
|
|
109
|
-
# "oauth_redirect_header": "Location",
|
|
110
|
-
# "channels": [
|
|
111
|
-
# {"channelId": "netflix", "channelName": "Netflix", "channelNumber": "600"},
|
|
112
|
-
# {"channelId": "youtube", "channelName": "Youtube", "channelNumber": "-1"},
|
|
113
|
-
# ],
|
|
114
|
-
# },
|
|
115
|
-
# "be-fr": {
|
|
116
|
-
# "api_url": "https://web-api-prod-obo.horizon.tv/oesp/v4/BE/fr/web",
|
|
117
|
-
# "personalization_url_format": "https://prod.spark.telenettv.be/fr/web/personalization-service/v1/customer/{household_id}/devices",
|
|
118
|
-
# "mqtt_url": "obomsg.prod.be.horizon.tv",
|
|
119
|
-
# "use_oauth": True,
|
|
120
|
-
# "oauth_username_fieldname": "j_username",
|
|
121
|
-
# "oauth_password_fieldname": "j_password",
|
|
122
|
-
# "oauth_add_accept_header": False,
|
|
123
|
-
# "oauth_url": "https://login.prd.telenet.be/openid/login.do",
|
|
124
|
-
# "oauth_quote_login": False,
|
|
125
|
-
# "oauth_redirect_header": "Location",
|
|
126
|
-
# "channels": [],
|
|
127
|
-
# },
|
|
128
|
-
# "at": {
|
|
129
|
-
# "api_url": "https://prod.spark.magentatv.at",
|
|
130
|
-
# "personalization_url_format": "https://prod.spark.magentatv.at/deu/web/personalization-service/v1/customer/{householdId}/devices",
|
|
131
|
-
# "mqtt_url": "obomsg.prod.at.horizon.tv",
|
|
132
|
-
# "use_oauth": False,
|
|
133
|
-
# "channels": [],
|
|
134
|
-
# "language": "de",
|
|
135
|
-
# },
|
|
136
117
|
"gb": {
|
|
137
118
|
"api_url": "https://spark-prod-gb.gnp.cloud.virgintvgo.virginmedia.com",
|
|
138
119
|
"oauth_url": "https://id.virginmedia.com/rest/v40/session/start?protocol=oidc&rememberMe=true",
|
|
139
120
|
"channels": [],
|
|
140
121
|
"oesp_url": "https://prod.oesp.virginmedia.com/oesp/v4/GB/eng/web",
|
|
141
122
|
"language": "en",
|
|
123
|
+
"use_legacy_auth": False,
|
|
142
124
|
},
|
|
143
|
-
# "gb-preprod": {
|
|
144
|
-
# "api_url": "https://web-api-preprod-obo.horizon.tv/oesp/v4/GB/eng/web/",
|
|
145
|
-
# "personalization_url_format": "https://preprod.spark.virginmedia.com/eng/web/personalization-service/v1/customer/{household_id}/devices",
|
|
146
|
-
# "mqtt_url": "obomsg.preprod.gb.horizon.tv",
|
|
147
|
-
# "use_oauth": False,
|
|
148
|
-
# "oauth_username_fieldname": "username",
|
|
149
|
-
# "oauth_password_fieldname": "credential",
|
|
150
|
-
# "oauth_add_accept_header": True,
|
|
151
|
-
# "oauth_url": "https://id.virginmedia.com/rest/v40/session/start?protocol=oidc&rememberMe=true",
|
|
152
|
-
# "oauth_quote_login": True,
|
|
153
|
-
# "oauth_redirect_header": "x-redirect-location",
|
|
154
|
-
# "channels": [],
|
|
155
|
-
# },
|
|
156
125
|
"ie": {
|
|
157
126
|
"api_url": "https://spark-prod-ie.gnp.cloud.virginmediatv.ie",
|
|
158
127
|
"use_oauth": False,
|
|
159
128
|
"channels": [],
|
|
160
129
|
"language": "en",
|
|
130
|
+
"use_legacy_auth": False,
|
|
161
131
|
},
|
|
162
132
|
"pl": {
|
|
163
133
|
"api_url": "https://spark-prod-pl.gnp.cloud.upctv.pl",
|
|
@@ -168,40 +138,6 @@ COUNTRY_SETTINGS = {
|
|
|
168
138
|
"EOS": {"manufacturer": "Arris", "model": "DCX960"},
|
|
169
139
|
"APOLLO": {"manufacturer": "Arris", "model": "VIP5002W"},
|
|
170
140
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
# "api_url": "https://web-api-pepper.horizon.tv/oesp/v4/HU/HUN/web",
|
|
174
|
-
# "personalization_url_format": "https://prod.spark.upctv.hu/HUN/web/personalization-service/v1/customer/{householdId}/devices", # guessed
|
|
175
|
-
# "mqtt_url": "obomsg.prod.hu.horizon.tv/mqtt",
|
|
176
|
-
# "use_oauth": False,
|
|
177
|
-
# "channels": [],
|
|
178
|
-
# },
|
|
179
|
-
# "de": {
|
|
180
|
-
# "api_url": "https://web-api-pepper.horizon.tv/oesp/v4/DE/DEU/web",
|
|
181
|
-
# "personalization_url_format": "https://prod.spark.upctv.de/DEU/web/personalization-service/v1/customer/{householdId}/devices", # guessed
|
|
182
|
-
# "mqtt_url": "obomsg.prod.de.horizon.tv/mqtt",
|
|
183
|
-
# "use_oauth": False,
|
|
184
|
-
# "channels": [],
|
|
185
|
-
# },
|
|
186
|
-
# "cz": {
|
|
187
|
-
# "api_url": "https://web-api-pepper.horizon.tv/oesp/v4/CZ/ces/web/",
|
|
188
|
-
# "personalization_url_format": "https://prod.spark.upctv.cz/ces/web/personalization-service/v1/customer/{householdId}/devices", # guessed
|
|
189
|
-
# "mqtt_url": "obomsg.prod.cz.horizon.tv/mqtt",
|
|
190
|
-
# "use_oauth": False,
|
|
191
|
-
# "channels": [],
|
|
192
|
-
# },
|
|
193
|
-
# "sk": {
|
|
194
|
-
# "api_url": "https://web-api-pepper.horizon.tv/oesp/v4/sk/slk/web/",
|
|
195
|
-
# "personalization_url_format": "https://prod.spark.upctv.sk/SLK/web/personalization-service/v1/customer/{householdId}/devices", # guessed
|
|
196
|
-
# "mqtt_url": "obomsg.prod.sk.horizon.tv/mqtt",
|
|
197
|
-
# "use_oauth": False,
|
|
198
|
-
# "channels": [],
|
|
199
|
-
# },
|
|
200
|
-
# "ro": {
|
|
201
|
-
# "api_url": "https://web-api-pepper.horizon.tv/oesp/v4/ro/ron/web/",
|
|
202
|
-
# "personalization_url_format": "https://prod.spark.upctv.ro/ron/web/personalization-service/v1/customer/{householdId}/devices", # guessed
|
|
203
|
-
# "mqtt_url": "obomsg.prod.ro.horizon.tv/mqtt",
|
|
204
|
-
# "use_oauth": False,
|
|
205
|
-
# "channels": [],
|
|
206
|
-
# },
|
|
141
|
+
"use_legacy_auth": False,
|
|
142
|
+
}
|
|
207
143
|
}
|
lghorizon/lghorizon_api.py
CHANGED
|
@@ -79,9 +79,10 @@ class LGHorizonApi:
|
|
|
79
79
|
backoff.expo, LGHorizonApiConnectionError, max_tries=3, logger=_logger
|
|
80
80
|
)
|
|
81
81
|
def _authorize(self) -> None:
|
|
82
|
-
|
|
82
|
+
ctry_code = self._country_code[0:2]
|
|
83
|
+
if ctry_code == "be":
|
|
83
84
|
self.authorize_telenet()
|
|
84
|
-
elif
|
|
85
|
+
elif ctry_code == "gb":
|
|
85
86
|
self.authorize_gb()
|
|
86
87
|
else:
|
|
87
88
|
self._authorize_default()
|
|
@@ -269,9 +270,10 @@ class LGHorizonApi:
|
|
|
269
270
|
|
|
270
271
|
def _obtain_mqtt_token(self):
|
|
271
272
|
_logger.debug("Obtain mqtt token...")
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
mqtt_auth_url = self._config["authorizationService"]["URL"]
|
|
274
|
+
if self._country_settings["use_legacy_auth"]:
|
|
275
|
+
mqtt_auth_url = self._country_settings["api_url"] + "/auth-service"
|
|
276
|
+
mqtt_response = self._do_api_call(f"{mqtt_auth_url}/v1/mqtt/token")
|
|
275
277
|
self._auth.mqttToken = mqtt_response["token"]
|
|
276
278
|
_logger.debug(f"MQTT token: {self._auth.mqttToken}")
|
|
277
279
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
lghorizon/__init__.py,sha256=_VjVE44ErvJJMnF5QgXdlw_nQzbHZUhGWw5hF40PolQ,426
|
|
2
|
+
lghorizon/const.py,sha256=GljKG9GNOv3vXpY6wdjkJLfBZJPqKx0MzmQBrdmYEoE,4873
|
|
3
|
+
lghorizon/exceptions.py,sha256=spEjRvbNdce2fauQiOFromAbV1QcfA0uMUt0nRVnnkM,318
|
|
4
|
+
lghorizon/helpers.py,sha256=ZWpi7B3hBvwGV02KWQQHVyj7FLLUDtIvKc-Iqsj5VHA,263
|
|
5
|
+
lghorizon/lghorizon_api.py,sha256=wsLn-uj3DVWqwwmLDz3Wt9AM6CjFBPxGed8CAXsPPVA,23770
|
|
6
|
+
lghorizon/models.py,sha256=mOeW9LegkaSlYefyyxVUGrNgSGiWcbEqGFd3lyyCzjQ,23678
|
|
7
|
+
lghorizon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
lghorizon-0.6.9.dist-info/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
|
|
9
|
+
lghorizon-0.6.9.dist-info/METADATA,sha256=4wEZyvLhmXPSl6lK9bxc_Hg5bKLkgOhAK1kSoOcwJRo,1038
|
|
10
|
+
lghorizon-0.6.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
11
|
+
lghorizon-0.6.9.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
|
|
12
|
+
lghorizon-0.6.9.dist-info/RECORD,,
|
lghorizon-0.6.7.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
lghorizon/__init__.py,sha256=_VjVE44ErvJJMnF5QgXdlw_nQzbHZUhGWw5hF40PolQ,426
|
|
2
|
-
lghorizon/const.py,sha256=75Qqmf6XJcBYcOya18cdeRrWq2D_1Q45tz9MLlfQ8Ao,8407
|
|
3
|
-
lghorizon/exceptions.py,sha256=spEjRvbNdce2fauQiOFromAbV1QcfA0uMUt0nRVnnkM,318
|
|
4
|
-
lghorizon/helpers.py,sha256=ZWpi7B3hBvwGV02KWQQHVyj7FLLUDtIvKc-Iqsj5VHA,263
|
|
5
|
-
lghorizon/lghorizon_api.py,sha256=1lNnN6FaPo4oV4x_SLXBA5kLnIILiNz8w3CiRko26Ao,23597
|
|
6
|
-
lghorizon/models.py,sha256=mOeW9LegkaSlYefyyxVUGrNgSGiWcbEqGFd3lyyCzjQ,23678
|
|
7
|
-
lghorizon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
lghorizon-0.6.7.dist-info/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
|
|
9
|
-
lghorizon-0.6.7.dist-info/METADATA,sha256=yF-VpLIb2XBfkFIXzmcpb8PIWCrQbyynYVUlegF4NbA,1038
|
|
10
|
-
lghorizon-0.6.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
11
|
-
lghorizon-0.6.7.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
|
|
12
|
-
lghorizon-0.6.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|