Don't crash if readpicture returns no image bytes

This commit is contained in:
Danielle McLean 2024-05-09 12:10:22 +10:00
parent 8b5912bed2
commit f7fc453c50
Signed by: 00dani
GPG key ID: 6854781A0488421C

View file

@ -93,7 +93,7 @@ class MpdStateListener(Player):
async def readpicture(self, file: str) -> bytes | None:
try:
readpic = await self.client.readpicture(file)
return readpic["binary"]
return readpic.get("binary")
except CommandError:
return None