From 2ac261e1c98edc8db259d37d0a77d534d36c36b0 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Tue, 3 Feb 2026 05:15:27 +0300 Subject: [PATCH] Add debug logging for play_media troubleshooting Co-Authored-By: Claude Opus 4.5 --- custom_components/emby_player/api.py | 7 +++++++ custom_components/emby_player/media_player.py | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/custom_components/emby_player/api.py b/custom_components/emby_player/api.py index 3909eec..bb0adc2 100644 --- a/custom_components/emby_player/api.py +++ b/custom_components/emby_player/api.py @@ -230,6 +230,13 @@ class EmbyApiClient: if start_position_ticks > 0: params["StartPositionTicks"] = start_position_ticks + _LOGGER.debug( + "Sending play_media: endpoint=%s, session_id=%s, item_ids=%s, command=%s", + endpoint, + session_id, + item_ids, + play_command, + ) await self._post(endpoint, params=params) async def _playback_command(self, session_id: str, command: str) -> None: diff --git a/custom_components/emby_player/media_player.py b/custom_components/emby_player/media_player.py index fbc0fc8..8907e5b 100644 --- a/custom_components/emby_player/media_player.py +++ b/custom_components/emby_player/media_player.py @@ -394,6 +394,12 @@ class EmbyMediaPlayer(CoordinatorEntity[EmbyCoordinator], MediaPlayerEntity): **kwargs: Any, ) -> None: """Play a piece of media.""" + _LOGGER.debug( + "async_play_media called: session_id=%s, media_type=%s, media_id=%s", + self._session_id, + media_type, + media_id, + ) await self._runtime_data.api.play_media( self._session_id, item_ids=[media_id],