Skip to content

Fix DLNA volume feedback, poll state updates, and stale stream detection#3376

Open
sfortis wants to merge 1 commit intomusic-assistant:devfrom
sfortis:fix/dlna-volume-state-updates
Open

Fix DLNA volume feedback, poll state updates, and stale stream detection#3376
sfortis wants to merge 1 commit intomusic-assistant:devfrom
sfortis:fix/dlna-volume-state-updates

Conversation

@sfortis
Copy link
Contributor

@sfortis sfortis commented Mar 13, 2026

Fixes several DLNA/UPnP player issues observed on devices like JBL Authentics:

Volume feedback delay: After volume_set() or volume_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() called async_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.

- 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
@OzGav OzGav added the bugfix label Mar 15, 2026
TransportState.PLAYING,
TransportState.TRANSITIONING,
):
# Detect stale PLAYING state after server restart:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants