lghorizon 0.9.0.dev1__tar.gz → 0.9.0.dev2__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.9.0.dev1 → lghorizon-0.9.0.dev2}/PKG-INFO +1 -1
- lghorizon-0.9.0.dev2/lghorizon/__init__.py +3 -0
- lghorizon-0.9.0.dev1/lghorizon/lghorizonapi.py → lghorizon-0.9.0.dev2/lghorizon/lghorizon_api.py +15 -15
- {lghorizon-0.9.0.dev1/lghorizon/models → lghorizon-0.9.0.dev2/lghorizon}/lghorizon_device.py +25 -31
- lghorizon-0.9.0.dev1/lghorizon/device_state_processor.py → lghorizon-0.9.0.dev2/lghorizon/lghorizon_device_state_processor.py +9 -9
- lghorizon-0.9.0.dev1/lghorizon/message_factory.py → lghorizon-0.9.0.dev2/lghorizon/lghorizon_message_factory.py +1 -1
- lghorizon-0.9.0.dev2/lghorizon/lghorizon_models.py +1331 -0
- {lghorizon-0.9.0.dev1/lghorizon/models → lghorizon-0.9.0.dev2/lghorizon}/lghorizon_mqtt_client.py +4 -7
- lghorizon-0.9.0.dev1/lghorizon/recording_factory.py → lghorizon-0.9.0.dev2/lghorizon/lghorizon_recording_factory.py +1 -1
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon.egg-info/PKG-INFO +1 -1
- lghorizon-0.9.0.dev2/lghorizon.egg-info/SOURCES.txt +35 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/main.py +2 -2
- lghorizon-0.9.0.dev1/lghorizon/__init__.py +0 -36
- lghorizon-0.9.0.dev1/lghorizon/models/__init__.py +0 -12
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_auth.py +0 -227
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_channel.py +0 -53
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_config.py +0 -65
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_customer.py +0 -55
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_device_state.py +0 -180
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_entitlements.py +0 -21
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_events.py +0 -119
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_message.py +0 -113
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_profile.py +0 -46
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_recordings.py +0 -243
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_sources.py +0 -127
- lghorizon-0.9.0.dev1/lghorizon/models/lghorizon_ui_status.py +0 -127
- lghorizon-0.9.0.dev1/lghorizon.egg-info/SOURCES.txt +0 -47
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/.coverage +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/.flake8 +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/.github/workflows/build-on-pr.yml +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/.github/workflows/publish-to-pypi.yml +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/.gitignore +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/.vscode/launch.json +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/LICENSE +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/README.md +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/instructions.txt +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon/const.py +0 -0
- {lghorizon-0.9.0.dev1/lghorizon/models → lghorizon-0.9.0.dev2/lghorizon}/exceptions.py +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon/helpers.py +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon/legacy/lghorizon_api.py +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon/legacy/models.py +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon/py.typed +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon.egg-info/dependency_links.txt +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon.egg-info/not-zip-safe +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon.egg-info/requires.txt +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lghorizon.egg-info/top_level.txt +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/lib64 +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/pyvenv.cfg +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/renovate.json +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/secrets_stub.json +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/setup.cfg +0 -0
- {lghorizon-0.9.0.dev1 → lghorizon-0.9.0.dev2}/setup.py +0 -0
lghorizon-0.9.0.dev1/lghorizon/lghorizonapi.py → lghorizon-0.9.0.dev2/lghorizon/lghorizon_api.py
RENAMED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from typing import Any, Dict, cast
|
|
5
5
|
|
|
6
|
-
from .
|
|
7
|
-
from .
|
|
8
|
-
from .
|
|
9
|
-
from .
|
|
10
|
-
from .
|
|
11
|
-
from .
|
|
12
|
-
from .
|
|
13
|
-
from .
|
|
14
|
-
from .
|
|
15
|
-
from .
|
|
16
|
-
from .
|
|
17
|
-
from .
|
|
18
|
-
from .
|
|
19
|
-
from .
|
|
20
|
-
from .
|
|
6
|
+
from .lghorizon_device import LGHorizonDevice
|
|
7
|
+
from .lghorizon_models import LGHorizonChannel
|
|
8
|
+
from .lghorizon_models import LGHorizonAuth
|
|
9
|
+
from .lghorizon_models import LGHorizonCustomer
|
|
10
|
+
from .lghorizon_mqtt_client import LGHorizonMqttClient
|
|
11
|
+
from .lghorizon_models import LGHorizonServicesConfig
|
|
12
|
+
from .lghorizon_models import LGHorizonEntitlements
|
|
13
|
+
from .lghorizon_models import LGHorizonProfile
|
|
14
|
+
from .lghorizon_models import LGHorizonMessageType
|
|
15
|
+
from .lghorizon_message_factory import LGHorizonMessageFactory
|
|
16
|
+
from .lghorizon_models import LGHorizonStatusMessage, LGHorizonUIStatusMessage
|
|
17
|
+
from .lghorizon_models import LGHorizonRunningState
|
|
18
|
+
from .lghorizon_models import LGHorizonRecordingList, LGHorizonRecordingQuota
|
|
19
|
+
from .lghorizon_recording_factory import LGHorizonRecordingFactory
|
|
20
|
+
from .lghorizon_device_state_processor import LGHorizonDeviceStateProcessor
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
_LOGGER = logging.getLogger(__name__)
|
{lghorizon-0.9.0.dev1/lghorizon/models → lghorizon-0.9.0.dev2/lghorizon}/lghorizon_device.py
RENAMED
|
@@ -1,44 +1,38 @@
|
|
|
1
|
-
"""LG Horizon
|
|
1
|
+
"""LG Horizon Device."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
2
4
|
|
|
3
5
|
import json
|
|
4
6
|
import logging
|
|
5
|
-
from typing import
|
|
6
|
-
|
|
7
|
+
from typing import Any, Callable, Coroutine, Dict, Optional
|
|
8
|
+
from .lghorizon_models import (
|
|
9
|
+
LGHorizonRunningState,
|
|
10
|
+
LGHorizonStatusMessage,
|
|
11
|
+
LGHorizonUIStatusMessage,
|
|
12
|
+
LGHorizonDeviceState,
|
|
13
|
+
LGHorizonAuth,
|
|
14
|
+
LGHorizonChannel,
|
|
15
|
+
)
|
|
7
16
|
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
MEDIA_KEY_CHANNEL_UP,
|
|
17
|
+
from .exceptions import LGHorizonApiConnectionError
|
|
18
|
+
from .helpers import make_id
|
|
19
|
+
from .lghorizon_device_state_processor import LGHorizonDeviceStateProcessor
|
|
20
|
+
from .lghorizon_mqtt_client import LGHorizonMqttClient
|
|
21
|
+
from .const import (
|
|
14
22
|
MEDIA_KEY_CHANNEL_DOWN,
|
|
23
|
+
MEDIA_KEY_CHANNEL_UP,
|
|
15
24
|
MEDIA_KEY_ENTER,
|
|
16
|
-
MEDIA_KEY_REWIND,
|
|
17
25
|
MEDIA_KEY_FAST_FORWARD,
|
|
26
|
+
MEDIA_KEY_PLAY_PAUSE,
|
|
27
|
+
MEDIA_KEY_POWER,
|
|
18
28
|
MEDIA_KEY_RECORD,
|
|
29
|
+
MEDIA_KEY_REWIND,
|
|
30
|
+
MEDIA_KEY_STOP,
|
|
31
|
+
ONLINE_RUNNING,
|
|
19
32
|
PLATFORM_TYPES,
|
|
20
33
|
)
|
|
21
|
-
from ..helpers import make_id
|
|
22
|
-
from .lghorizon_auth import LGHorizonAuth
|
|
23
|
-
from .lghorizon_channel import LGHorizonChannel
|
|
24
|
-
from .lghorizon_mqtt_client import LGHorizonMqttClient # Added import for type checking
|
|
25
|
-
from .lghorizon_device_state import LGHorizonDeviceState, LGHorizonRunningState
|
|
26
|
-
from .exceptions import LGHorizonApiConnectionError
|
|
27
|
-
from .lghorizon_message import LGHorizonStatusMessage, LGHorizonUIStatusMessage
|
|
28
|
-
|
|
29
|
-
from ..device_state_processor import LGHorizonDeviceStateProcessor
|
|
30
|
-
|
|
31
|
-
# Assuming these models are available from legacy or will be moved to models/
|
|
32
|
-
# from ..legacy.models import (
|
|
33
|
-
# # LGHorizonPlayingInfo,
|
|
34
|
-
# # LGHorizonPlayerState, # This is now in lghorizon_ui_status.py
|
|
35
|
-
# # LGHorizonReplayEvent,
|
|
36
|
-
# # LGHorizonRecordingSingle,
|
|
37
|
-
# # LGHorizonVod,
|
|
38
|
-
# # LGHorizonApp,
|
|
39
|
-
# )
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
_LOGGER = logging.getLogger(__name__)
|
|
42
36
|
|
|
43
37
|
|
|
44
38
|
class LGHorizonDevice:
|
|
@@ -207,7 +201,7 @@ class LGHorizonDevice:
|
|
|
207
201
|
|
|
208
202
|
async def _trigger_callback(self):
|
|
209
203
|
if self._change_callback:
|
|
210
|
-
|
|
204
|
+
_LOGGER.debug("Callback called from box %s", self.device_id)
|
|
211
205
|
await self._change_callback(self.device_id)
|
|
212
206
|
|
|
213
207
|
async def turn_on(self) -> None:
|
|
@@ -6,9 +6,9 @@ import urllib.parse
|
|
|
6
6
|
|
|
7
7
|
from typing import cast, Dict, Optional
|
|
8
8
|
|
|
9
|
-
from .
|
|
10
|
-
from .
|
|
11
|
-
from .
|
|
9
|
+
from .lghorizon_models import LGHorizonDeviceState, LGHorizonRunningState
|
|
10
|
+
from .lghorizon_models import LGHorizonStatusMessage, LGHorizonUIStatusMessage
|
|
11
|
+
from .lghorizon_models import (
|
|
12
12
|
LGHorizonSourceType,
|
|
13
13
|
LGHorizonLinearSource,
|
|
14
14
|
LGHorizonVODSource,
|
|
@@ -16,20 +16,20 @@ from .models.lghorizon_sources import (
|
|
|
16
16
|
LGHorizonNDVRSource,
|
|
17
17
|
LGHorizonReviewBufferSource,
|
|
18
18
|
)
|
|
19
|
-
from .
|
|
20
|
-
from .
|
|
19
|
+
from .lghorizon_models import LGHorizonAuth
|
|
20
|
+
from .lghorizon_models import (
|
|
21
21
|
LGHorizonReplayEvent,
|
|
22
22
|
LGHorizonVOD,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
from .
|
|
26
|
-
from .
|
|
27
|
-
from .
|
|
25
|
+
from .lghorizon_models import LGHorizonRecordingSingle
|
|
26
|
+
from .lghorizon_models import LGHorizonChannel
|
|
27
|
+
from .lghorizon_models import (
|
|
28
28
|
LGHorizonUIStateType,
|
|
29
29
|
LGHorizonAppsState,
|
|
30
30
|
LGHorizonPlayerState,
|
|
31
31
|
)
|
|
32
|
-
from .
|
|
32
|
+
from .lghorizon_models import LGHorizonCustomer
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class LGHorizonDeviceStateProcessor:
|