python-linkplay 0.2.6__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 CHANGED
@@ -1 +1 @@
1
- __version__ = '0.2.6'
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) -> None:
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python_linkplay
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: A Python Library for Seamless LinkPlay Device Control
5
5
  Author: Velleman Group nv
6
6
  License: MIT
@@ -1,16 +1,16 @@
1
1
  linkplay/__init__.py,sha256=y9ZehEq-KhS3cwn-PUpwVSJGfDUx7e5wf_G6guODcTk,56
2
2
  linkplay/__main__.py,sha256=Wcza80QaWfOaHjyJEfQYhB9kiPLE0NOqIj4zVWv2Nqs,577
3
- linkplay/__version__.py,sha256=T150U4daRZ7ULOwxGUzzoBDAqm3bW9UydvCf0KJii9I,22
4
- linkplay/bridge.py,sha256=IGohfJbBNa4C9cgva--Uhq5iMz4eRnljLbx-SqlsYd8,21582
5
- linkplay/consts.py,sha256=vKlEZvo7-OIjHziimtZ3t4VkPZBoJc--Qj-7gHigxWk,15441
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
6
  linkplay/controller.py,sha256=U370dMVl-E7iIhDC1wWmsrnFcdrWso84K0vkImsgCTo,4430
7
7
  linkplay/discovery.py,sha256=g5CPlSF_Hxrg-_aza1M1l2zuUKoY-tWMpNY0ngZGGbQ,4570
8
8
  linkplay/endpoint.py,sha256=_gelW0cDWt0SC8EApwaKIVh_YJIMNiOkfrLR_RYW7aM,2677
9
9
  linkplay/exceptions.py,sha256=UHcV0Yok0hdM0MYgHRwTWnMJ612Ts0iJvMFHX-IxmNo,312
10
10
  linkplay/manufacturers.py,sha256=vvD5KnxtxGLz5t_r1mGATv86tDsQL622zYXH8WFk2Hc,4227
11
11
  linkplay/utils.py,sha256=fZHGnUM4XFrQ7MM6guHhaEmxJbVlwilbwoZXvXwSfMs,9480
12
- python_linkplay-0.2.6.dist-info/licenses/LICENSE,sha256=bgEtxMyjEHX_4uwaAY3GCFTm234D4AOZ5dM15sk26ms,1073
13
- python_linkplay-0.2.6.dist-info/METADATA,sha256=KBLoGGeAzrgYPmcU3c3C4K2wVoN-PT9_3L5ftEmbk-g,3260
14
- python_linkplay-0.2.6.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
15
- python_linkplay-0.2.6.dist-info/top_level.txt,sha256=CpSaOVPTzJf5TVIL7MrotSCR34gcIOQy-11l4zGmxxM,9
16
- python_linkplay-0.2.6.dist-info/RECORD,,
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,,