From 3520939452b0c1b4bdd916c2d6c39cdaefbe3b57 Mon Sep 17 00:00:00 2001 From: diamond75 Date: Fri, 4 Apr 2025 22:26:22 +1300 Subject: [PATCH] Update. --- zotify/playable.py | 3 ++- zotify/utils.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/zotify/playable.py b/zotify/playable.py index c13627d..d7ce046 100644 --- a/zotify/playable.py +++ b/zotify/playable.py @@ -232,8 +232,9 @@ class Track(PlayableContentFeeder.LoadedStream, Playable): try: return self.__lyrics except AttributeError: + print(self.track) self.__lyrics = Lyrics( - self.__api.invoke_url(LYRICS_URL + bytes_to_base62(self.track.hex_id()))[ + self.__api.invoke_url(LYRICS_URL + bytes_to_base62(self.track.gid))[ "lyrics" ] ) diff --git a/zotify/utils.py b/zotify/utils.py index 5780704..4d4fe9b 100644 --- a/zotify/utils.py +++ b/zotify/utils.py @@ -1,3 +1,5 @@ +import binascii + from argparse import Action from enum import Enum, IntEnum from pathlib import Path @@ -216,5 +218,5 @@ def bytes_to_base62(idstr: bytes) -> str: Returns: base62 """ - print (idstr) + print (binascii.hexlify(idstr)) return BASE62.encode(idstr, 22).decode()