python-linkplay 0.2.5__py3-none-any.whl → 0.2.7__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.
- linkplay/__version__.py +1 -1
- linkplay/bridge.py +8 -2
- linkplay/consts.py +9 -0
- linkplay/discovery.py +0 -1
- linkplay/manufacturers.py +8 -0
- {python_linkplay-0.2.5.dist-info → python_linkplay-0.2.7.dist-info}/METADATA +1 -1
- python_linkplay-0.2.7.dist-info/RECORD +16 -0
- {python_linkplay-0.2.5.dist-info → python_linkplay-0.2.7.dist-info}/WHEEL +1 -1
- python_linkplay-0.2.5.dist-info/RECORD +0 -16
- {python_linkplay-0.2.5.dist-info → python_linkplay-0.2.7.dist-info}/licenses/LICENSE +0 -0
- {python_linkplay-0.2.5.dist-info → python_linkplay-0.2.7.dist-info}/top_level.txt +0 -0
linkplay/__version__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '0.2.
|
1
|
+
__version__ = '0.2.7'
|
linkplay/bridge.py
CHANGED
@@ -8,6 +8,7 @@ from linkplay.consts import (
|
|
8
8
|
LOGGER,
|
9
9
|
PLAY_MODE_SEND_MAP,
|
10
10
|
AudioOutputHwMode,
|
11
|
+
AudioOutputModeResponse,
|
11
12
|
ChannelType,
|
12
13
|
DeviceAttribute,
|
13
14
|
EqualizerMode,
|
@@ -298,9 +299,14 @@ class LinkPlayPlayer:
|
|
298
299
|
"""Set the audio hardware output."""
|
299
300
|
await self.bridge.request(LinkPlayCommand.AUDIO_OUTPUT_HW_MODE_SET.format(mode))
|
300
301
|
|
301
|
-
async def get_audio_output_hw_mode(self) ->
|
302
|
+
async def get_audio_output_hw_mode(self) -> AudioOutputModeResponse:
|
302
303
|
"""Get the audio hardware output."""
|
303
|
-
await self.bridge.json_request(LinkPlayCommand.AUDIO_OUTPUT_HW_MODE)
|
304
|
+
resp = await self.bridge.json_request(LinkPlayCommand.AUDIO_OUTPUT_HW_MODE)
|
305
|
+
return AudioOutputModeResponse(
|
306
|
+
AudioOutputHwMode(str(resp.get("hardware"))),
|
307
|
+
resp.get("source", "") == "1",
|
308
|
+
resp.get("audiocast", "") == "1",
|
309
|
+
)
|
304
310
|
|
305
311
|
@property
|
306
312
|
def muted(self) -> bool:
|
linkplay/consts.py
CHANGED
@@ -520,3 +520,12 @@ AUDIO_OUTPUT_HW_MODE_MAP: dict[AudioOutputHwMode, str] = { # case sensitive!
|
|
520
520
|
AudioOutputHwMode.COAXIAL: "co-axial",
|
521
521
|
AudioOutputHwMode.HEADPHONES: "headphones",
|
522
522
|
}
|
523
|
+
|
524
|
+
|
525
|
+
class AudioOutputModeResponse:
|
526
|
+
"""Defines a response for the audio output hardware mode."""
|
527
|
+
|
528
|
+
def __init__(self, hardware: AudioOutputHwMode, source: bool, audiocast: bool):
|
529
|
+
self.hardware = hardware
|
530
|
+
self.bluetooth_source = source
|
531
|
+
self.audiocast = audiocast
|
linkplay/discovery.py
CHANGED
linkplay/manufacturers.py
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
from typing import Final
|
4
4
|
|
5
|
+
from linkplay.consts import LOGGER
|
6
|
+
|
5
7
|
MANUFACTURER_ARTSOUND: Final[str] = "ArtSound"
|
6
8
|
MANUFACTURER_ARYLIC: Final[str] = "Arylic"
|
7
9
|
MANUFACTURER_IEAST: Final[str] = "iEAST"
|
@@ -71,4 +73,10 @@ PROJECTID_LOOKUP: Final[dict[str, tuple[str, str]]] = {
|
|
71
73
|
|
72
74
|
def get_info_from_project(project: str) -> tuple[str, str]:
|
73
75
|
"""Get manufacturer and model info based on given project."""
|
76
|
+
if project not in PROJECTID_LOOKUP:
|
77
|
+
LOGGER.warning(
|
78
|
+
"The device '%s' is not found in our list. To improve experience, open an issue on GitHub with the project name %s, the manufacturer and the product name.",
|
79
|
+
project,
|
80
|
+
project,
|
81
|
+
)
|
74
82
|
return PROJECTID_LOOKUP.get(project, (MANUFACTURER_GENERIC, MODELS_GENERIC))
|
@@ -0,0 +1,16 @@
|
|
1
|
+
linkplay/__init__.py,sha256=y9ZehEq-KhS3cwn-PUpwVSJGfDUx7e5wf_G6guODcTk,56
|
2
|
+
linkplay/__main__.py,sha256=Wcza80QaWfOaHjyJEfQYhB9kiPLE0NOqIj4zVWv2Nqs,577
|
3
|
+
linkplay/__version__.py,sha256=e3cfQy_iVs9ILsymUalJnJu5D_dd7HuUVoVwKKurcL0,22
|
4
|
+
linkplay/bridge.py,sha256=Id0yDa807qo0Jv_0IUIwnok0EuUa-0z01rABul4AcXs,21834
|
5
|
+
linkplay/consts.py,sha256=zfumy4_KlagE6ECcZaOYFlDygeRaNhM7VbiAvQjDMtM,15731
|
6
|
+
linkplay/controller.py,sha256=U370dMVl-E7iIhDC1wWmsrnFcdrWso84K0vkImsgCTo,4430
|
7
|
+
linkplay/discovery.py,sha256=g5CPlSF_Hxrg-_aza1M1l2zuUKoY-tWMpNY0ngZGGbQ,4570
|
8
|
+
linkplay/endpoint.py,sha256=_gelW0cDWt0SC8EApwaKIVh_YJIMNiOkfrLR_RYW7aM,2677
|
9
|
+
linkplay/exceptions.py,sha256=UHcV0Yok0hdM0MYgHRwTWnMJ612Ts0iJvMFHX-IxmNo,312
|
10
|
+
linkplay/manufacturers.py,sha256=vvD5KnxtxGLz5t_r1mGATv86tDsQL622zYXH8WFk2Hc,4227
|
11
|
+
linkplay/utils.py,sha256=fZHGnUM4XFrQ7MM6guHhaEmxJbVlwilbwoZXvXwSfMs,9480
|
12
|
+
python_linkplay-0.2.7.dist-info/licenses/LICENSE,sha256=bgEtxMyjEHX_4uwaAY3GCFTm234D4AOZ5dM15sk26ms,1073
|
13
|
+
python_linkplay-0.2.7.dist-info/METADATA,sha256=VAhMiPCwZKT4_qdBPKShdEc8kie1-1vYiaSK47Ip4GA,3260
|
14
|
+
python_linkplay-0.2.7.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
15
|
+
python_linkplay-0.2.7.dist-info/top_level.txt,sha256=CpSaOVPTzJf5TVIL7MrotSCR34gcIOQy-11l4zGmxxM,9
|
16
|
+
python_linkplay-0.2.7.dist-info/RECORD,,
|
@@ -1,16 +0,0 @@
|
|
1
|
-
linkplay/__init__.py,sha256=y9ZehEq-KhS3cwn-PUpwVSJGfDUx7e5wf_G6guODcTk,56
|
2
|
-
linkplay/__main__.py,sha256=Wcza80QaWfOaHjyJEfQYhB9kiPLE0NOqIj4zVWv2Nqs,577
|
3
|
-
linkplay/__version__.py,sha256=8f4ummWTPl6PtdE9DzSUgZhPjGioA_NDC-hDpqzB9qI,22
|
4
|
-
linkplay/bridge.py,sha256=IGohfJbBNa4C9cgva--Uhq5iMz4eRnljLbx-SqlsYd8,21582
|
5
|
-
linkplay/consts.py,sha256=vKlEZvo7-OIjHziimtZ3t4VkPZBoJc--Qj-7gHigxWk,15441
|
6
|
-
linkplay/controller.py,sha256=U370dMVl-E7iIhDC1wWmsrnFcdrWso84K0vkImsgCTo,4430
|
7
|
-
linkplay/discovery.py,sha256=NnkO9gknp3Cyff7830zBu1LwyhkkWCdhDbEDbAwF8D8,4610
|
8
|
-
linkplay/endpoint.py,sha256=_gelW0cDWt0SC8EApwaKIVh_YJIMNiOkfrLR_RYW7aM,2677
|
9
|
-
linkplay/exceptions.py,sha256=UHcV0Yok0hdM0MYgHRwTWnMJ612Ts0iJvMFHX-IxmNo,312
|
10
|
-
linkplay/manufacturers.py,sha256=oddlZTbtrCBVCcy5adbXk0bhBOXEcmC6U5-a7QShLHY,3906
|
11
|
-
linkplay/utils.py,sha256=fZHGnUM4XFrQ7MM6guHhaEmxJbVlwilbwoZXvXwSfMs,9480
|
12
|
-
python_linkplay-0.2.5.dist-info/licenses/LICENSE,sha256=bgEtxMyjEHX_4uwaAY3GCFTm234D4AOZ5dM15sk26ms,1073
|
13
|
-
python_linkplay-0.2.5.dist-info/METADATA,sha256=XFBM5m--r4RlIx-EkXh1MBFjxUoLelu7Cks9E2V3CaY,3260
|
14
|
-
python_linkplay-0.2.5.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
15
|
-
python_linkplay-0.2.5.dist-info/top_level.txt,sha256=CpSaOVPTzJf5TVIL7MrotSCR34gcIOQy-11l4zGmxxM,9
|
16
|
-
python_linkplay-0.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|