Fix DLNA volume feedback, poll state updates, and stale stream detection#3376
Open
sfortis wants to merge 1 commit intomusic-assistant:devfrom
Open
Fix DLNA volume feedback, poll state updates, and stale stream detection#3376sfortis wants to merge 1 commit intomusic-assistant:devfrom
sfortis wants to merge 1 commit intomusic-assistant:devfrom
Conversation
- Poll RenderingControl after volume_set/volume_mute for instant feedback - Call _update_player() in poll() to push state changes to WS clients - Detect stale flow streams after server restart and auto-resume queue
| TransportState.PLAYING, | ||
| TransportState.TRANSITIONING, | ||
| ): | ||
| # Detect stale PLAYING state after server restart: |
Contributor
There was a problem hiding this comment.
I don't think detecting stale streams is something we should implement on provider level. I would leave this code out of this PR. If you want to implement this somewhere I think the player_controller would be the place to do this, but this should be a separate PR so we can move the discussion there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes several DLNA/UPnP player issues observed on devices like JBL Authentics:
Volume feedback delay: After
volume_set()orvolume_mute(), internal state waited up to 30s for the next poll cycle. Now explicitly polls RenderingControl and pushes state immediately.Poll not pushing state:
poll()calledasync_update()but never_update_player(), so updated state was not pushed to WebSocket clients. Added the missing call.Explicit RenderingControl polling: Some DLNA devices (e.g. JBL Authentics) do not send reliable LastChange volume events even with active subscriptions. Added
_poll_rendering_control()helper that directly queries GetVolume/GetMute actions.Stale flow stream detection: After MA restart, some devices keep reporting PLAYING with a dead flow URL from the previous session. Added session ID comparison that detects the mismatch, returns IDLE, and triggers a one-shot queue resume.