From f7fc453c509ef8750365bac466147e828185e905 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Thu, 9 May 2024 12:10:22 +1000 Subject: [PATCH] Don't crash if readpicture returns no image bytes --- src/mpd_now_playable/mpd/listener.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mpd_now_playable/mpd/listener.py b/src/mpd_now_playable/mpd/listener.py index ffd8a61..b044139 100644 --- a/src/mpd_now_playable/mpd/listener.py +++ b/src/mpd_now_playable/mpd/listener.py @@ -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