Skip to content

Commit

Permalink
Fix update of netaudio information when using telnet (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
ol-iver authored Feb 11, 2024
1 parent b09a478 commit 376b865
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions denonavr/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def _schedule_netaudio_update(self) -> None:

def _update_netaudio(self) -> None:
"""Update netaudio information."""
if self._device.telnet_api.send_commands("NSE"):
if self._device.telnet_available:
self._device.telnet_api.send_commands("NSE")
self._schedule_netaudio_update()
else:
self._stop_media_update()
Expand Down Expand Up @@ -314,7 +315,8 @@ def _schedule_tuner_update(self) -> None:

def _update_tuner(self) -> None:
"""Update tuner information."""
if self._device.telnet_api.send_commands("TFAN?", "TFANNAME?"):
if self._device.telnet_available:
self._device.telnet_api.send_commands("TFAN?", "TFANNAME?")
self._schedule_tuner_update()
else:
self._stop_media_update()
Expand Down Expand Up @@ -357,7 +359,8 @@ def _schedule_hdtuner_update(self) -> None:

def _update_hdtuner(self) -> None:
"""Update HD tuner information."""
if self._device.telnet_api.send_commands("HD?"):
if self._device.telnet_available:
self._device.telnet_api.send_commands("HD?")
self._schedule_hdtuner_update()
else:
self._stop_media_update()
Expand Down

0 comments on commit 376b865

Please sign in to comment.