From 25d13f45ad7dbbf574c92212cfaf4c5ddb89c68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20St=C3=A5hl?= Date: Thu, 21 Jul 2022 19:52:34 +0200 Subject: [PATCH] add debug prints --- pyatv/core/protocol.py | 1 + pyatv/protocols/mrp/protocol.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pyatv/core/protocol.py b/pyatv/core/protocol.py index 972174ba3..ec97e5baf 100644 --- a/pyatv/core/protocol.py +++ b/pyatv/core/protocol.py @@ -111,6 +111,7 @@ async def _call_listener(func): tasks = [] loop = asyncio.get_event_loop() listeners = self.__listeners.get(dispatch_type, []) + _LOGGER.error("LISTENERS: %s", self.__listeners) for func in [func for filter_func, func in listeners if filter_func(message)]: _LOGGER.debug( "Dispatching message with type %s to %s", diff --git a/pyatv/protocols/mrp/protocol.py b/pyatv/protocols/mrp/protocol.py index bd11cdc73..eb5e5a05d 100644 --- a/pyatv/protocols/mrp/protocol.py +++ b/pyatv/protocols/mrp/protocol.py @@ -284,10 +284,12 @@ def message_received(self, message: protobuf.ProtocolMessage, _) -> None: # waiting for the respone so we save it here identifier = message.identifier or "type_" + str(message.type) if identifier in self._outstanding: + _LOGGER.error("OUTSTANDING: %s", message) outstanding = OutstandingMessage( self._outstanding[identifier].semaphore, message ) self._outstanding[identifier] = outstanding self._outstanding[identifier].semaphore.release() else: + _LOGGER.error("DISPATCH %s: %s", message.type, message) self.dispatch(message.type, message)