Format code with yapf
This commit fixes the style issues introduced in b96b369
according to the output
from yapf.
Details: https://deepsource.io/gh/kokarare1212/librespot-python/transform/be8d92d8-4cc2-4865-94f6-a55f638282f5/
This commit is contained in:
parent
b96b369c3c
commit
a702e60bf1
|
@ -52,8 +52,7 @@ class AudioKeyManager(PacketsReceiver):
|
||||||
return self.get_audio_key(gid, file_id, False)
|
return self.get_audio_key(gid, file_id, False)
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Failed fetching audio key! gid: {}, fileId: {}".format(
|
"Failed fetching audio key! gid: {}, fileId: {}".format(
|
||||||
Utils.bytes_to_hex(gid),
|
Utils.bytes_to_hex(gid), Utils.bytes_to_hex(file_id)))
|
||||||
Utils.bytes_to_hex(file_id)))
|
|
||||||
|
|
||||||
return key
|
return key
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,8 @@ class CdnFeedHelper:
|
||||||
|
|
||||||
streamer = session.cdn().stream_file(file, key, url, halt_listener)
|
streamer = session.cdn().stream_file(file, key, url, halt_listener)
|
||||||
input_stream = streamer.stream()
|
input_stream = streamer.stream()
|
||||||
normalization_data = NormalizationData.NormalizationData.read(input_stream)
|
normalization_data = NormalizationData.NormalizationData.read(
|
||||||
|
input_stream)
|
||||||
if input_stream.skip(0xA7) != 0xA7:
|
if input_stream.skip(0xA7) != 0xA7:
|
||||||
raise IOError("Couldn't skip 0xa7 bytes!")
|
raise IOError("Couldn't skip 0xa7 bytes!")
|
||||||
return PlayableContentFeeder.PlayableContentFeeder.LoadedStream(
|
return PlayableContentFeeder.PlayableContentFeeder.LoadedStream(
|
||||||
|
|
|
@ -166,8 +166,7 @@ class EpisodeId(SpotifyId, PlayableId):
|
||||||
if matcher is not None:
|
if matcher is not None:
|
||||||
episode_id = matcher.group(1)
|
episode_id = matcher.group(1)
|
||||||
return EpisodeId(
|
return EpisodeId(
|
||||||
Utils.bytes_to_hex(
|
Utils.bytes_to_hex(PlayableId.BASE62.decode(episode_id, 16)))
|
||||||
PlayableId.BASE62.decode(episode_id, 16)))
|
|
||||||
TypeError("Not a Spotify episode ID: {}".format(uri))
|
TypeError("Not a Spotify episode ID: {}".format(uri))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in New Issue