python-linkplay 0.0.15__tar.gz → 0.0.17__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.
- {python_linkplay-0.0.15/src/python_linkplay.egg-info → python_linkplay-0.0.17}/PKG-INFO +2 -2
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/setup.cfg +1 -1
- python_linkplay-0.0.17/src/linkplay/__version__.py +1 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/bridge.py +19 -6
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/consts.py +1 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17/src/python_linkplay.egg-info}/PKG-INFO +2 -2
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/python_linkplay.egg-info/requires.txt +1 -1
- python_linkplay-0.0.15/src/linkplay/__version__.py +0 -1
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/LICENSE +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/README.md +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/pyproject.toml +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/setup.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/__init__.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/__main__.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/controller.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/discovery.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/endpoint.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/exceptions.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/linkplay/utils.py +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/python_linkplay.egg-info/SOURCES.txt +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/python_linkplay.egg-info/dependency_links.txt +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/python_linkplay.egg-info/not-zip-safe +0 -0
- {python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/python_linkplay.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: python_linkplay
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.17
|
4
4
|
Summary: A Python Library for Seamless LinkPlay Device Control
|
5
5
|
Author: Velleman Group nv
|
6
6
|
License: MIT
|
@@ -13,7 +13,7 @@ Requires-Dist: aiohttp>=3.8.5
|
|
13
13
|
Requires-Dist: appdirs>=1.4.4
|
14
14
|
Requires-Dist: async_upnp_client>=0.36.2
|
15
15
|
Requires-Dist: deprecated>=1.2.14
|
16
|
-
Requires-Dist: aiofiles>=
|
16
|
+
Requires-Dist: aiofiles>=23.1.0
|
17
17
|
Provides-Extra: testing
|
18
18
|
Requires-Dist: pytest>=7.3.1; extra == "testing"
|
19
19
|
Requires-Dist: pytest-cov>=4.1.0; extra == "testing"
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.0.17'
|
@@ -62,18 +62,20 @@ class LinkPlayDevice:
|
|
62
62
|
flags = InputMode(
|
63
63
|
int(self.properties[DeviceAttribute.PLAYMODE_SUPPORT], base=16)
|
64
64
|
)
|
65
|
-
|
65
|
+
|
66
|
+
playing_modes = [INPUT_MODE_MAP[flag] for flag in flags]
|
67
|
+
playing_modes.insert(0, PlayingMode.NETWORK) # always supported
|
68
|
+
return playing_modes
|
66
69
|
|
67
70
|
@property
|
68
71
|
def eth(self) -> str:
|
69
72
|
"""Returns the ethernet address."""
|
70
73
|
return (
|
71
|
-
self.properties[DeviceAttribute.
|
74
|
+
self.properties[DeviceAttribute.ETH2]
|
72
75
|
if DeviceAttribute.ETH_DHCP in self.properties
|
73
|
-
else self.properties[DeviceAttribute.
|
76
|
+
else self.properties[DeviceAttribute.APCLI0]
|
74
77
|
)
|
75
78
|
|
76
|
-
|
77
79
|
class LinkPlayPlayer:
|
78
80
|
"""Represents a LinkPlay player."""
|
79
81
|
|
@@ -163,10 +165,21 @@ class LinkPlayPlayer:
|
|
163
165
|
|
164
166
|
async def play_preset(self, preset_number: int) -> None:
|
165
167
|
"""Play a preset."""
|
166
|
-
|
167
|
-
|
168
|
+
max_number_of_presets_allowed = int(
|
169
|
+
self.bridge.device.properties.get(DeviceAttribute.PRESET_KEY) or "10"
|
170
|
+
)
|
171
|
+
if not 0 < preset_number <= max_number_of_presets_allowed:
|
172
|
+
raise ValueError(
|
173
|
+
f"Preset must be between 1 and {max_number_of_presets_allowed}."
|
174
|
+
)
|
168
175
|
await self.bridge.request(LinkPlayCommand.PLAY_PRESET.format(preset_number))
|
169
176
|
|
177
|
+
async def timesync(self) -> None:
|
178
|
+
"""Sync the time."""
|
179
|
+
import time
|
180
|
+
timestamp = time.strftime('%Y%m%d%H%M%S')
|
181
|
+
await self.bridge.request(LinkPlayCommand.TIMESYNC.format(timestamp))
|
182
|
+
|
170
183
|
@property
|
171
184
|
def muted(self) -> bool:
|
172
185
|
"""Returns if the player is muted."""
|
@@ -96,6 +96,7 @@ class LinkPlayCommand(StrEnum):
|
|
96
96
|
MULTIROOM_UNMUTE = "setPlayerCmd:slave_mute:unmute"
|
97
97
|
MULTIROOM_JOIN = "ConnectMasterAp:JoinGroupMaster:eth{}:wifi0.0.0.0"
|
98
98
|
PLAY_PRESET = "MCUKeyShortClick:{}"
|
99
|
+
TIMESYNC = "timeSync:{}"
|
99
100
|
|
100
101
|
|
101
102
|
class LinkPlayTcpUartCommand(StrEnum):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: python_linkplay
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.17
|
4
4
|
Summary: A Python Library for Seamless LinkPlay Device Control
|
5
5
|
Author: Velleman Group nv
|
6
6
|
License: MIT
|
@@ -13,7 +13,7 @@ Requires-Dist: aiohttp>=3.8.5
|
|
13
13
|
Requires-Dist: appdirs>=1.4.4
|
14
14
|
Requires-Dist: async_upnp_client>=0.36.2
|
15
15
|
Requires-Dist: deprecated>=1.2.14
|
16
|
-
Requires-Dist: aiofiles>=
|
16
|
+
Requires-Dist: aiofiles>=23.1.0
|
17
17
|
Provides-Extra: testing
|
18
18
|
Requires-Dist: pytest>=7.3.1; extra == "testing"
|
19
19
|
Requires-Dist: pytest-cov>=4.1.0; extra == "testing"
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.0.15'
|
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
|
{python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/python_linkplay.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
{python_linkplay-0.0.15 → python_linkplay-0.0.17}/src/python_linkplay.egg-info/top_level.txt
RENAMED
File without changes
|