Skip to content

Commit

Permalink
thisalsoworks
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoSotoC committed Oct 31, 2024
1 parent 787e3ba commit cb072c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion music_assistant/server/providers/snapcast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ async def cmd_volume_set(self, player_id: str, volume_level: int) -> None:
async def cmd_stop(self, player_id: str) -> None:
"""Send STOP command to given player."""
player = self.mass.players.get(player_id, raise_unavailable=False)
player.elapsed_time = time.time()
if stream_task := self._stream_tasks.pop(player_id, None):
if not stream_task.done():
stream_task.cancel()
Expand Down Expand Up @@ -560,6 +559,7 @@ async def _streamer() -> None:
while stream.status != "idle":
await asyncio.sleep(0.25)
player.state = PlayerState.IDLE
player.elapsed_time = time.time() - player.elapsed_time_last_updated
self.mass.players.update(player_id)
self._set_childs_state(player_id)
finally:
Expand Down

0 comments on commit cb072c1

Please sign in to comment.