Fix kodi log spamming (#69113)
This commit is contained in:
parent
ebfba783e0
commit
5f897874cb
1 changed files with 4 additions and 3 deletions
|
@ -321,7 +321,6 @@ class KodiEntity(MediaPlayerEntity):
|
|||
self._app_properties = {}
|
||||
self._media_position_updated_at = None
|
||||
self._media_position = None
|
||||
self._connect_error = False
|
||||
|
||||
@property
|
||||
def _kodi_is_off(self):
|
||||
|
@ -447,8 +446,9 @@ class KodiEntity(MediaPlayerEntity):
|
|||
except (jsonrpc_base.jsonrpc.TransportError, CannotConnectError):
|
||||
if not self._connect_error:
|
||||
self._connect_error = True
|
||||
_LOGGER.error("Unable to connect to Kodi via websocket")
|
||||
_LOGGER.warning("Unable to connect to Kodi via websocket")
|
||||
await self._clear_connection(False)
|
||||
self._connect_error = False
|
||||
|
||||
async def _ping(self):
|
||||
try:
|
||||
|
@ -456,8 +456,9 @@ class KodiEntity(MediaPlayerEntity):
|
|||
except (jsonrpc_base.jsonrpc.TransportError, CannotConnectError):
|
||||
if not self._connect_error:
|
||||
self._connect_error = True
|
||||
_LOGGER.error("Unable to ping Kodi via websocket")
|
||||
_LOGGER.warning("Unable to ping Kodi via websocket")
|
||||
await self._clear_connection()
|
||||
self._connect_error = False
|
||||
|
||||
async def _async_connect_websocket_if_disconnected(self, *_):
|
||||
"""Reconnect the websocket if it fails."""
|
||||
|
|
Loading…
Add table
Reference in a new issue