-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapcast fix lost state when stop #1764
Conversation
@@ -432,6 +432,7 @@ 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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesnt make any sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well then there is a bug somewhere else.
With this it works as it should.
The problem is that when pausing, it goes back to the first song in the queue.
It also clears the list of songs already played.
Do you have any idea what it could be ?
I understand that the code does not make sense, but I leave a video showing the error and the “solution”. Current status in branch dev: current_dev_branch.mp4With the change in the pr: fix.mp4 |
Does this make more sense? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this fix makes more sense
I have been trying this a little more and it does not solve the error, the first solution does, the second does not, it is strange because it certainly does not make sense. |
Move the change to cmd_stop if it seems to fix it. It shouldn't make a difference though. |
No description provided.