diff --git a/librespot/audio/AudioKeyManager.py b/librespot/audio/AudioKeyManager.py index 1fd16b3..935266d 100644 --- a/librespot/audio/AudioKeyManager.py +++ b/librespot/audio/AudioKeyManager.py @@ -52,8 +52,8 @@ class AudioKeyManager(PacketsReceiver): return self.get_audio_key(gid, file_id, False) raise RuntimeError( "Failed fetching audio key! gid: {}, fileId: {}".format( - Utils.Utils.bytes_to_hex(gid), - Utils.Utils.bytes_to_hex(file_id))) + Utils.bytes_to_hex(gid), + Utils.bytes_to_hex(file_id))) return key diff --git a/librespot/audio/cdn/CdnFeedHelper.py b/librespot/audio/cdn/CdnFeedHelper.py index e1299fd..7537ac6 100644 --- a/librespot/audio/cdn/CdnFeedHelper.py +++ b/librespot/audio/cdn/CdnFeedHelper.py @@ -64,7 +64,7 @@ class CdnFeedHelper: url = resp.url CdnFeedHelper._LOGGER.debug("Fetched external url for {}: {}".format( - Utils.Utils.bytes_to_hex(episode.gid), url)) + Utils.bytes_to_hex(episode.gid), url)) streamer = session.cdn().stream_external_episode( episode, url, halt_listener) diff --git a/librespot/audio/storage/ChannelManager.py b/librespot/audio/storage/ChannelManager.py index b2bd9c8..03e18fc 100644 --- a/librespot/audio/storage/ChannelManager.py +++ b/librespot/audio/storage/ChannelManager.py @@ -74,7 +74,7 @@ class ChannelManager(Closeable, PacketsReceiver.PacketsReceiver): else: self._LOGGER.warning( "Couldn't handle packet, cmd: {}, payload: {}".format( - packet.cmd, Utils.Utils.bytes_to_hex(packet.payload))) + packet.cmd, Utils.bytes_to_hex(packet.payload))) def close(self) -> None: self._executorService.shutdown() diff --git a/librespot/metadata/__init__.py b/librespot/metadata/__init__.py index 7818074..90b6005 100644 --- a/librespot/metadata/__init__.py +++ b/librespot/metadata/__init__.py @@ -166,14 +166,14 @@ class EpisodeId(SpotifyId, PlayableId): if matcher is not None: episode_id = matcher.group(1) return EpisodeId( - Utils.Utils.bytes_to_hex( + Utils.bytes_to_hex( PlayableId.BASE62.decode(episode_id, 16))) TypeError("Not a Spotify episode ID: {}".format(uri)) @staticmethod def from_base62(base62: str) -> EpisodeId: return EpisodeId( - Utils.Utils.bytes_to_hex(PlayableId.BASE62.decode(base62, 16))) + Utils.bytes_to_hex(PlayableId.BASE62.decode(base62, 16))) @staticmethod def from_hex(hex_str: str) -> EpisodeId: @@ -184,13 +184,13 @@ class EpisodeId(SpotifyId, PlayableId): def to_spotify_uri(self) -> str: return "Spotify:episode:{}".format( - PlayableId.BASE62.encode(Utils.Utils.hex_to_bytes(self._hexId))) + PlayableId.BASE62.encode(Utils.hex_to_bytes(self._hexId))) def hex_id(self) -> str: return self._hexId def get_gid(self) -> bytes: - return Utils.Utils.hex_to_bytes(self._hexId) + return Utils.hex_to_bytes(self._hexId) class ShowId(SpotifyId): diff --git a/librespot/player/codecs/__init__.py b/librespot/player/codecs/__init__.py index 837810e..c56b7eb 100644 --- a/librespot/player/codecs/__init__.py +++ b/librespot/player/codecs/__init__.py @@ -1,2 +1 @@ -from librespot.player.codecs.VorbisOnlyAudioQuality import \ - VorbisOnlyAudioQuality +from librespot.player.codecs.VorbisOnlyAudioQuality import VorbisOnlyAudioQuality