fixing import errors
This commit is contained in:
parent
0214721dd7
commit
3a38afeef0
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
from librespot.player.codecs.VorbisOnlyAudioQuality import \
|
||||
VorbisOnlyAudioQuality
|
||||
from librespot.player.codecs.VorbisOnlyAudioQuality import VorbisOnlyAudioQuality
|
||||
|
|
Loading…
Reference in New Issue