Reduce unnecessary state refreshes to prevent UI dialog closure

- Don't refresh immediately after play_media (WebSocket handles it)
- Ignore PlaybackProgress WebSocket messages (polling handles position)
- Keeps refresh for playback controls (play/pause/stop) for immediate feedback

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 05:17:10 +03:00
parent 2ac261e1c9
commit 8419b0de8c
2 changed files with 10 additions and 9 deletions

View File

@@ -404,7 +404,8 @@ class EmbyMediaPlayer(CoordinatorEntity[EmbyCoordinator], MediaPlayerEntity):
self._session_id,
item_ids=[media_id],
)
await self.coordinator.async_request_refresh()
# Don't refresh immediately - WebSocket will send PlaybackStart event,
# or polling will update state. Immediate refresh can close UI dialogs.
async def async_browse_media(
self,