Don't log missing mpd artwork inappropriately (#45908)

This can get unnecessarily spammy and doesn't represent an actual
actionable issue.

Fixes: #45235
This commit is contained in:
Martin Weinelt 2021-02-04 14:18:51 +01:00 committed by GitHub
parent 134b1d3f63
commit 61a987061e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 10 deletions

View File

@ -2,6 +2,6 @@
"domain": "mpd", "domain": "mpd",
"name": "Music Player Daemon (MPD)", "name": "Music Player Daemon (MPD)",
"documentation": "https://www.home-assistant.io/integrations/mpd", "documentation": "https://www.home-assistant.io/integrations/mpd",
"requirements": ["python-mpd2==3.0.3"], "requirements": ["python-mpd2==3.0.4"],
"codeowners": ["@fabaff"] "codeowners": ["@fabaff"]
} }

View File

@ -281,6 +281,7 @@ class MpdDevice(MediaPlayerEntity):
try: try:
response = await self._client.readpicture(file) response = await self._client.readpicture(file)
except mpd.CommandError as error: except mpd.CommandError as error:
if error.errno is not mpd.FailureResponseCode.NO_EXIST:
_LOGGER.warning( _LOGGER.warning(
"Retrieving artwork through `readpicture` command failed: %s", "Retrieving artwork through `readpicture` command failed: %s",
error, error,
@ -291,6 +292,7 @@ class MpdDevice(MediaPlayerEntity):
try: try:
response = await self._client.albumart(file) response = await self._client.albumart(file)
except mpd.CommandError as error: except mpd.CommandError as error:
if error.errno is not mpd.FailureResponseCode.NO_EXIST:
_LOGGER.warning( _LOGGER.warning(
"Retrieving artwork through `albumart` command failed: %s", "Retrieving artwork through `albumart` command failed: %s",
error, error,

View File

@ -1795,7 +1795,7 @@ python-juicenet==1.0.1
python-miio==0.5.4 python-miio==0.5.4
# homeassistant.components.mpd # homeassistant.components.mpd
python-mpd2==3.0.3 python-mpd2==3.0.4
# homeassistant.components.mystrom # homeassistant.components.mystrom
python-mystrom==1.1.2 python-mystrom==1.1.2