From affdd2681d1a1daebc9199a9db5e2d63f4c9d112 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:50:44 -0300 Subject: [PATCH] Improve audio debug logs and decryption handling --- votify/interface/audio.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/votify/interface/audio.py b/votify/interface/audio.py index 145f8cc..a5b5cb3 100644 --- a/votify/interface/audio.py +++ b/votify/interface/audio.py @@ -164,7 +164,7 @@ class SpotifyAudioInterface(SpotifyBaseInterface): ), ) - logger.debug(f"Parsed stream info: {stream_info}") + logger.debug(f"Parsed stream info from web method: {stream_info}") return stream_info @@ -281,7 +281,7 @@ class SpotifyAudioInterface(SpotifyBaseInterface): audio_file_info[0].file.file_id.hex(), ) - return StreamInfoAv( + stream_info = StreamInfoAv( audio_track=StreamInfo( stream_url=stream_url, widevine_pssh=None, @@ -291,6 +291,10 @@ class SpotifyAudioInterface(SpotifyBaseInterface): ), ) + logger.debug(f"Parsed stream info from desktop method: {stream_info}") + + return stream_info + async def get_widevine_decryption_key(self, pssh: str) -> DecryptionKey: return await self._get_widevine_decryption_key(pssh, "audio") @@ -308,13 +312,13 @@ class SpotifyAudioInterface(SpotifyBaseInterface): file_id, ) - decryption_key = DecryptionKey( + decryption_key_obj = DecryptionKey( decryption_key=decryption_key, ) - logger.debug(f"Received decryption key from librespot: {decryption_key}") + logger.debug(f"Received decryption key from librespot: {decryption_key.hex()}") - return decryption_key + return decryption_key_obj async def _get_desktop_decryption_key(self, file_id: bytes) -> DecryptionKey: if not self.key_emu: @@ -334,6 +338,11 @@ class SpotifyAudioInterface(SpotifyBaseInterface): obfuscated_key=license.obfuscated_key, content_id=file_id[: EMULATOR_SIZES.CONTENT_ID], ) + + logger.debug( + f"Received decryption key from desktop method: {decryption_key.hex()}" + ) + return DecryptionKey( decryption_key=decryption_key, )