lghorizon 0.7.3b4__py3-none-any.whl → 0.7.4__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/lghorizon_api.py +12 -14
- {lghorizon-0.7.3b4.dist-info → lghorizon-0.7.4.dist-info}/METADATA +1 -1
- lghorizon-0.7.4.dist-info/RECORD +12 -0
- lghorizon-0.7.3b4.dist-info/RECORD +0 -12
- {lghorizon-0.7.3b4.dist-info → lghorizon-0.7.4.dist-info}/LICENSE +0 -0
- {lghorizon-0.7.3b4.dist-info → lghorizon-0.7.4.dist-info}/WHEEL +0 -0
- {lghorizon-0.7.3b4.dist-info → lghorizon-0.7.4.dist-info}/top_level.txt +0 -0
lghorizon/lghorizon_api.py
CHANGED
|
@@ -279,11 +279,7 @@ class LGHorizonApi:
|
|
|
279
279
|
def _on_mqtt_message(self, message: str, topic: str) -> None:
|
|
280
280
|
if "action" in message and message["action"] == "OPS.getProfilesUpdate":
|
|
281
281
|
self._update_customer()
|
|
282
|
-
self._channels.clear()
|
|
283
|
-
self._get_channels()
|
|
284
282
|
box: LGHorizonBox
|
|
285
|
-
for box in self.settop_boxes.values():
|
|
286
|
-
box.update_channels(self._channels)
|
|
287
283
|
elif "source" in message:
|
|
288
284
|
deviceId = message["source"]
|
|
289
285
|
if not isinstance(deviceId, str):
|
|
@@ -433,13 +429,6 @@ class LGHorizonApi:
|
|
|
433
429
|
channels_result = self._do_api_call(
|
|
434
430
|
f"{self._config['linearService']['URL']}/v2/channels?cityId={self.customer.cityId}&language={self._country_settings['language']}&productClass=Orion-DASH"
|
|
435
431
|
)
|
|
436
|
-
profile_channels = []
|
|
437
|
-
if self._profile_id and self._profile_id in self.customer.profiles:
|
|
438
|
-
profile_channels = self.customer.profiles[
|
|
439
|
-
self._profile_id
|
|
440
|
-
].favorite_channels
|
|
441
|
-
|
|
442
|
-
has_profile_channels = len(profile_channels) > 0
|
|
443
432
|
for channel in channels_result:
|
|
444
433
|
if "isRadio" in channel and channel["isRadio"]:
|
|
445
434
|
continue
|
|
@@ -449,12 +438,21 @@ class LGHorizonApi:
|
|
|
449
438
|
if len(common_entitlements) == 0:
|
|
450
439
|
continue
|
|
451
440
|
channel_id = channel["id"]
|
|
452
|
-
if has_profile_channels and channel_id not in profile_channels:
|
|
453
|
-
continue
|
|
454
|
-
|
|
455
441
|
self._channels[channel_id] = LGHorizonChannel(channel)
|
|
456
442
|
_logger.info(f"{len(self._channels)} retrieved.")
|
|
457
443
|
|
|
444
|
+
def get_display_channels(self):
|
|
445
|
+
all_channels = self._channels.values()
|
|
446
|
+
if not self._profile_id or self._profile_id not in self.customer.profiles:
|
|
447
|
+
return all_channels
|
|
448
|
+
profile_channel_ids = self.customer.profiles[self._profile_id].favorite_channels
|
|
449
|
+
if len(profile_channel_ids) == 0:
|
|
450
|
+
return all_channels
|
|
451
|
+
|
|
452
|
+
return [
|
|
453
|
+
channel for channel in all_channels if channel.id in profile_channel_ids
|
|
454
|
+
]
|
|
455
|
+
|
|
458
456
|
def _get_replay_event(self, listingId) -> Any:
|
|
459
457
|
"""Get listing."""
|
|
460
458
|
_logger.info("Retrieving replay event details...")
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
lghorizon/__init__.py,sha256=XqePG0hj8NnudOcfCtEWqPsWP5l2headzrQhkfuDlv8,544
|
|
2
|
+
lghorizon/const.py,sha256=S8UWatG7JPCqd1zk-iOoILTvFDEj7YhLcEXxLGhyJXs,4755
|
|
3
|
+
lghorizon/exceptions.py,sha256=-6v55KDTogBldGAg1wV9Mrxm5L5BsaVguhBgVMOeJHk,404
|
|
4
|
+
lghorizon/helpers.py,sha256=ZWpi7B3hBvwGV02KWQQHVyj7FLLUDtIvKc-Iqsj5VHA,263
|
|
5
|
+
lghorizon/lghorizon_api.py,sha256=D0nWWQ1R7DMkOQ7BkoWigjr1ivx57Uj08N7hZderBSM,21874
|
|
6
|
+
lghorizon/models.py,sha256=S_Pq8z9PpaN10b17aoi2j-mCIdZf-TK411pBGRPDkvc,24542
|
|
7
|
+
lghorizon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
lghorizon-0.7.4.dist-info/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
|
|
9
|
+
lghorizon-0.7.4.dist-info/METADATA,sha256=uv22YHR5QJwow7kXSYYhzz6OU9bqkz3WcG8YKmm-0OA,1037
|
|
10
|
+
lghorizon-0.7.4.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
11
|
+
lghorizon-0.7.4.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
|
|
12
|
+
lghorizon-0.7.4.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
lghorizon/__init__.py,sha256=XqePG0hj8NnudOcfCtEWqPsWP5l2headzrQhkfuDlv8,544
|
|
2
|
-
lghorizon/const.py,sha256=S8UWatG7JPCqd1zk-iOoILTvFDEj7YhLcEXxLGhyJXs,4755
|
|
3
|
-
lghorizon/exceptions.py,sha256=-6v55KDTogBldGAg1wV9Mrxm5L5BsaVguhBgVMOeJHk,404
|
|
4
|
-
lghorizon/helpers.py,sha256=ZWpi7B3hBvwGV02KWQQHVyj7FLLUDtIvKc-Iqsj5VHA,263
|
|
5
|
-
lghorizon/lghorizon_api.py,sha256=PcC-zmy_VK5WgUQChnwySE9CE5LPP1E3HXA_Pp_ExMg,21956
|
|
6
|
-
lghorizon/models.py,sha256=S_Pq8z9PpaN10b17aoi2j-mCIdZf-TK411pBGRPDkvc,24542
|
|
7
|
-
lghorizon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
lghorizon-0.7.3b4.dist-info/LICENSE,sha256=6Dh2tur1gMX3r3rITjVwUONBEJxyyPZDY8p6DZXtimE,1059
|
|
9
|
-
lghorizon-0.7.3b4.dist-info/METADATA,sha256=HKyX_ZJFeWEnMOLdaL4MvHaU8_7Xo9t7UE-tnLqZV3A,1039
|
|
10
|
-
lghorizon-0.7.3b4.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
11
|
-
lghorizon-0.7.3b4.dist-info/top_level.txt,sha256=usii76_AxGfPI6gjrrh-NyZxcQQuF1B8_Q9kd7sID8Q,10
|
|
12
|
-
lghorizon-0.7.3b4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|