python-linkplay 0.0.11__tar.gz → 0.0.12__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.
Files changed (23) hide show
  1. {python_linkplay-0.0.11/src/python_linkplay.egg-info → python_linkplay-0.0.12}/PKG-INFO +1 -1
  2. python_linkplay-0.0.12/src/linkplay/__version__.py +1 -0
  3. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/bridge.py +11 -3
  4. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/consts.py +1 -0
  5. {python_linkplay-0.0.11 → python_linkplay-0.0.12/src/python_linkplay.egg-info}/PKG-INFO +1 -1
  6. python_linkplay-0.0.11/src/linkplay/__version__.py +0 -1
  7. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/LICENSE +0 -0
  8. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/README.md +0 -0
  9. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/pyproject.toml +0 -0
  10. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/setup.cfg +0 -0
  11. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/setup.py +0 -0
  12. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/__init__.py +0 -0
  13. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/__main__.py +0 -0
  14. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/controller.py +0 -0
  15. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/discovery.py +0 -0
  16. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/endpoint.py +0 -0
  17. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/exceptions.py +0 -0
  18. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/linkplay/utils.py +0 -0
  19. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/python_linkplay.egg-info/SOURCES.txt +0 -0
  20. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/python_linkplay.egg-info/dependency_links.txt +0 -0
  21. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/python_linkplay.egg-info/not-zip-safe +0 -0
  22. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/src/python_linkplay.egg-info/requires.txt +0 -0
  23. {python_linkplay-0.0.11 → python_linkplay-0.0.12}/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.11
3
+ Version: 0.0.12
4
4
  Summary: A Python Library for Seamless LinkPlay Device Control
5
5
  Author: Velleman Group nv
6
6
  License: MIT
@@ -0,0 +1 @@
1
+ __version__ = '0.0.12'
@@ -130,6 +130,11 @@ class LinkPlayPlayer:
130
130
  await self.bridge.request(LinkPlayCommand.PAUSE)
131
131
  self.properties[PlayerAttribute.PLAYING_STATUS] = PlayingStatus.PAUSED
132
132
 
133
+ async def stop(self) -> None:
134
+ """Stop the current playing track and remove the selected source."""
135
+ await self.bridge.request(LinkPlayCommand.STOP)
136
+ self.properties[PlayerAttribute.PLAYING_STATUS] = PlayingStatus.STOPPED
137
+
133
138
  async def toggle(self) -> None:
134
139
  """Start playing if the player is currently not playing. Stops playing if it is."""
135
140
  await self.bridge.request(LinkPlayCommand.TOGGLE)
@@ -230,9 +235,12 @@ class LinkPlayPlayer:
230
235
  @property
231
236
  def play_mode(self) -> PlayingMode:
232
237
  """Returns the current playing mode of the player."""
233
- return PlayingMode(
234
- self.properties.get(PlayerAttribute.PLAYBACK_MODE, PlayingMode.IDLE)
235
- )
238
+ try:
239
+ return PlayingMode(
240
+ self.properties.get(PlayerAttribute.PLAYBACK_MODE, PlayingMode.IDLE)
241
+ )
242
+ except ValueError:
243
+ return PlayingMode(PlayingMode.IDLE)
236
244
 
237
245
  @property
238
246
  def loop_mode(self) -> LoopMode:
@@ -79,6 +79,7 @@ class LinkPlayCommand(StrEnum):
79
79
  VOLUME = "setPlayerCmd:vol:{}"
80
80
  PLAYLIST = "setPlayerCmd:playlist:uri:{}"
81
81
  PAUSE = "setPlayerCmd:pause"
82
+ STOP = "setPlayerCmd:stop"
82
83
  TOGGLE = "setPlayerCmd:onepause"
83
84
  EQUALIZER_MODE = "setPlayerCmd:equalizer:{}"
84
85
  LOOP_MODE = "setPlayerCmd:loopmode:{}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python_linkplay
3
- Version: 0.0.11
3
+ Version: 0.0.12
4
4
  Summary: A Python Library for Seamless LinkPlay Device Control
5
5
  Author: Velleman Group nv
6
6
  License: MIT
@@ -1 +0,0 @@
1
- __version__ = '0.0.11'