fix: retry playback intents over the command path that originally served them (ADB broadcasts annotate the intent, self-heal retry goes back over ADB)

This commit is contained in:
James Mackay committed 2026-10-08 07:39:53 +01:00
1 parent a2f1948a88
commit 359b96ef9c
2 files changed
+29 -4

No files matched your search

@@ -243,9 +243,20 @@ class NvidiaShieldMediaPlayer(MediaPlayerEntity):
"Intent %s not confirmed (JF=%s, want=%s), retrying (attempt %d)",
intent.command, jf_state, intent.target_state, intent.retry_count,
)
self.hass.async_create_task(
self._cmd(intent.command)
)
if (
intent.via_adb
and intent.adb_command
and self._adb_poller is not None
and self._adb_poller.connected
):
# The command was originally served by ADB — retry over ADB.
self.hass.async_create_task(
self._adb_poller.send_media_command(intent.adb_command)
)
else:
self.hass.async_create_task(
self._cmd(intent.command)
)
self._intent_timer_unsub = async_call_later(
self.hass, INTENT_TIMEOUT, self._on_intent_timeout
)
@@ -707,6 +718,11 @@ class NvidiaShieldMediaPlayer(MediaPlayerEntity):
if self._adb_poller and self._adb_poller.connected and not jf_active:
success = await self._adb_poller.send_media_command(adb_command)
if success:
# The ADB path served this command — the self-heal retry must
# also go over ADB, not back to the remote.
if self._intent is not None:
self._intent.via_adb = True
self._intent.adb_command = adb_command
return
# Fall back to Android TV Remote